User Authentication with IMAP, SMB, and FTP
Introduction
You may configure additional user backends in ownCloud’s configuration
file (config/config.php
) using the following syntax:
<?php
"user_backends" => [
0 => [
"class" => ...,
"arguments" => [
0 => ...
],
],
],
A non-blocking or correctly configured SELinux setup is needed for these backends to work, if SELinux is enabled on your server. Please refer to the SELinux configuration for further details. |
Currently the External user support app (user_external), which is not enabled by default, provides three backends. These are:
See Installing and Managing Apps for more information.
IMAP
Provides authentication against IMAP servers.
Option | Value/Description |
---|---|
Class |
|
Arguments |
A mailbox string as defined |
Dependency |
PHP’s IMAP extension. |
Example
<?php
"user_backends" => [
0 => [
"class" => "OC_User_IMAP",
"arguments" => [
// The IMAP server to authenticate against
'{imap.gmail.com:993/imap/ssl}',
// The domain to send email from
'example.com'
],
],
],
The second arguments parameter ensures that only users from that domain are allowed to login. When set, after a successful login, the domain will be stripped from the email address and the rest used as an ownCloud username. For example, if the email address is guest.user@example.com , then guest.user will be the username used by ownCloud.
|
SMB
Provides authentication against Samba servers.
Option | Value/Description |
---|---|
Class |
|
Arguments |
The samba server to authenticate against. |
Dependency |
FTP
Provides authentication against FTP servers.
Option | Value/Description |
---|---|
Class |
|
Arguments |
The FTP server to authenticate against. |
Dependency |
PHP’s FTP extension. |