---
description: TeamCal Neo also supports LDAP authentication for all users but 'admin''.
---

# LDAP Authentication

Edit the `config/config.app.php` file and scroll down to the LDAP section (around line 115).

There you will find all settings that you need to adjust in order to reflect the LDAP server that you want to use. For example:

```php
define('LDAP_YES', 1);                                       // Use LDAP authentication
define('LDAP_ADS', 0);                                       // Set to 1 when authenticating against an Active Directory
define('LDAP_HOST', "ldap.forumsys.com");                    // LDAP host name
define('LDAP_PORT', "389");                                  // LDAP port
define('LDAP_PASS', "password");                             // SA associated password
define('LDAP_DIT', "cn=read-only-admin,dc=example,dc=com");  // Directory Information Tree (Relative Distinguished Name)
define('LDAP_SBASE', "dc=example,dc=com");                   // Search base, location in the LDAP directory to search
define('LDAP_TLS', 0);                                       // To avoid "Undefined index: LDAP_TLS" error message for LDAP bind to Active Directory
define('LDAP_CHECK_ANONYMOUS_BIND', 0);                      // Set to 1 to check the LDAP server's 'anonymous bind' setting. Connection will be refused if not allowed.
```

The TeamCal Neo distribution comes with a sample configuration for a free online LDAP server at forumsys. Several users exist there that you can test with.

The sample database that comes with TeamCal Neo contains a user with username 'einstein'. In the TeamCal Neo database this user has the password 'Qwer!1234'.

This user also exists in the forumsys LDAP server with password 'password'. Once you set LDAP\_YES to 1 with the sample configuration, you can login with einstein/password.

{% hint style="info" %}
Note, that the 'admin' user will always authenticate against the TeamCal Neo database.
{% endhint %}
