LDAP_de - Psy-Virus/ampache GitHub Wiki
#LDAP
Configuring Ampache for LDAP authentication
Setting up LDAP is fairly straight-forward, assuming your LDAP server is already configured properly. To configure LDAP, add the following to your /config/ampache.cfg.php and fill in all of the ldap_* configuration values.
auth_methods = "ldap"
The above example does not include MySQL authentication support. Ampache can have multiple authentication methods at the same time. It will try them in the order they are listed until a match is found. If you would like it to try ldap first, and then fall back on mysql simply set auth_methods as follows.
auth_methods = "ldap,mysql"
Tips and Gotchas with LDAP
-
"undefined function ldap_connect()" when logging on: make sure PHP's LDAP libraries are installed and accessible ('sudo apt-get install php5-ldap' in Ubuntu). Once the libraries are installed, you may need to restart Apache if it is already running. ('sudo /etc/init.d/apache2 restart')
-
Specifying an ldap_objectclass value other than "*" may cause authentication to fail--check this value if you are getting authentication failure messages from the login page.
-
The auto_user variable DOES apply to the autocreation of LDAP users in Ampache's database. Valid values for auto_user are "guest", "user", and "admin".
-
When setting the value of ldap_filter, the config file states "For OpenLDAP use "uid"". In the large majority of cases this is correct, but it is worth verifying that the uid field does indeed exist in your LDAP configuration if you are having trouble authenticating.
-
If your LDAP server uses SSL/TLS, you may have problems connecting.