User authentication with IMAP, SMB, and FTP

You may configure additional user backends in Nextcloud’s configuration config/config.php using the following syntax:

"user_backends" => [
  [
    "class"     => ...,
    "arguments" => [
      ...
    ],
  ],
],

Note

A non-blocking or correctly configured SELinux setup is needed for these backends to work. Please refer to the SELinux configuration.

Currently the “External user support” (user_external) app, which you need to enable first (See Apps management) provides the following user backends:

IMAP

Provides authentication against IMAP servers

"user_backends" => [
  [
    "class"     => "OC_User_IMAP",
    "arguments" => [
      '{imap.gmail.com:993/imap/ssl}'
    ],
  ],
],

SMB

Provides authentication against Samba servers

  • Class: OC_User_SMB
  • Arguments: the samba server to authenticate against
  • Dependency: PHP smbclient module or smbclient (see SMB/CIFS)
  • Example:
"user_backends" => [
  [
    "class"     => "OC_User_SMB",
    "arguments" => [
      'localhost'
    ],
  ],
],

FTP

Provides authentication against FTP servers

  • Class: OC_User_FTP
  • Arguments: the FTP server to authenticate against
  • Dependency: php-ftp (See Installation on Linux)
  • Example:
"user_backends" => [
  [
    "class"     => "OC_User_FTP",
    "arguments" => [
      'localhost'
    ],
  ],
],