I have an LDAP server runs on:
ldap://129.168.0.117:389
or
ldap://roshd.org:389
where roshd.org = 129.168.0.117
I have this configuration in config.php in phpldapadmin:
$servers = new Datastore();
$servers->newServer('ldap_pla');
$servers->setValue('server','name','My LDAP Server');
$servers->setValue('server','host','192.168.0.117');
$servers->setValue('server','port',389);
$servers->setValue('login','auth_type','session');
$servers->setValue('login','bind_id','cn=Manager,dc=roshd,dc=org');
$servers->setValue('login','bind_pass','secret');
$servers->setValue('auto_number','search_base','ou=People,dc=roshd,dc=org');
in my sldap.conf:
...
database bdb
directory /usr/local/var/openldap-data
suffix "dc=roshd,dc=org"
rootdn "cn=Manager,dc=roshd,dc=org"
rootpw secret
...
but when I attemp to login in phpldapadmin, I got this error. is there any idea?
Unable to connect to LDAP server My LDAP Server
Error: Can't contact LDAP server (-1) for user
error Failed to Authenticate to server
Invalid Username or Password.
Spot the difference:
I suspect that the rootpw is either expected to be stored encrypted, and you have it clear text, in which case it is expecting perhaps a different result. (I.e. The hashed value of secret is being sent and being compared to the clear text string secret.)
If you are authenticating against ldap itself, you might want to check this setting:
$servers->setValue('login','attr','uid');
On CentOS 7 i get the same error, since SELinux does restrict access to ldap from httpd...
did the trick...
I had the same issue. You can check below.
Check If you have right ipaddress in $servers->setValue('server','host','ipaddress'); in ldap.conf file. and restart tomcat server. Cheers.
Check if user you are trying to login with exist or not using "ldapsearch -x" on terminal.