User Authentication with IMAP, SMB, and FTP

Introduction

With ownCloud, additional user backends can be configured.

The described configurations are examples, see the Configuration Notes documentation for more options.

The value definition below must be set according to the needs and the description in Define the user_backends app:

OWNCLOUD_USER_BACKENDS={"class":..., "arguments":[...]}

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

OC_User_IMAP.

Arguments

A mailbox string as defined
in the PHP documentation.

Dependency

The PHP IMAP extension is not part of the image. If you want to authenticate against IMAP, you need to build your own image based on the official ownCloud image and add the extension to it.

Example

OWNCLOUD_USER_BACKENDS=[{"class":"OC_User_IMAP","arguments":["{imap.example.com:993/imap/ssl}","example.com"]}]

Please note the following in the example above:

  • "{imap.example.com:993/imap/ssl}"
    The IMAP server to authenticate against.

  • "example.com"
    The domain to send the email from.

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

OC_User_SMB

Arguments

The samba server to authenticate against.

Dependency

smbclient.

Example

OWNCLOUD_USER_BACKENDS=[{"class":"OC_User_SMB","arguments":["localhost"]}]

FTP

Provides authentication against FTP servers.

Option Value/Description

Class

OC_User_FTP

Arguments

The FTP server to authenticate against.

Example

OWNCLOUD_USER_BACKENDS=[{"class":"OC_User_FTP","arguments":["localhost"]}]