Cannot login into new install of OpenLDAP
Solution 1
So first of all ubuntu manage to create a long how to (https://help.ubuntu.com/14.04/serverguide/openldap-server.html) about LDAP which omits an important phase:
You would have to run sudo dpkg-reconfigure slapd
after you installed slapd and select : NO - your.domain.com - Organisation name - password - password - HDB - YES - YES - NO
I found the solution at Where is the dc=example,dc=com ldap dit?
Thank's for muru
Solution 2
Edit: Apparantly this is a very wide spread issue and it has been reported in many other forums without a viable soloution. while ago I solved and reported the soloution here but after awhile when I wanted to redo the steps I reslised that i can't replicate sucessfully. so after some try and error again I succeed so I will put the instructions here, this time not omting any details. hopefully it helps. before starting the steps please make sure you have the IP address of your maching (e.g. using ifconfig
, for example 192.168.33.10)
knowing/changing your hostname: open the file
/etc/hostname
. you may delete everything there and replace it with your domain (e.g.myserver.org
).installing OpenLDAP packages: you need 3 packages
slapd
,ldap-utils
andphpldapadmin
. installingslapd
you will be asked to enter admin password.-
configuring OpenLDAP: open
/etc/ldap/ldap.conf
uncomment the lines below (remove the # from the beginning of the lines)BASE dc=example,dc=com
URI ldap://ldap.example.com ldap://ldap-master.example.com:666
and change them to
BASE dc=myserver,dc=org
URI ldap://192.168.33.10 ldap://192.168.33.10:666
please remember that you have to replace the example IP
192.168.33.10
with your IP adress. configuring phpldapadmin: open
/etc/phpldapadmin/config.php
in editor. Look for the lines having$servers->setValue
, change127.0.0.1
to the server IP address. change allexample
s andcom
s to the terms you have set in step aReconfigure the OpenLDAP Server: you need to Reconfigure the OpenLDAP Server (I don't know why really!)
sudo dpkg-reconfigure slapd
then select :NO
->myserver.com
->OrganisationName
->password
->password
->HDB
->NO
->YES
->NO
the problem should be solved by now. but when you go forward there is another problem as described here in this post. you can solve it by the instructions in the link
I should thanks Anandd Nayyar and refer to his youtube video which helped me a lot to solve these issues.
Related videos on Youtube
elemer82
Updated on September 18, 2022Comments
-
elemer82 over 1 year
In Oracle VM Virtualbox I installed a fresh new copy of Ubuntu Server 14.04.1 64 bit version, with OpenSSH installed as well. Steps I done:
sudo apt-get install slapd ldap-utils
nano /etc/ldap/ldap.conf
Here I enteredBASE dc=elemer,dc=local
URI ldap://192.168.0.14
sudo apt-get install phpldapadmin
sudo nano /etc/phpldapadmin/config.php
and replaced all the "dc=example,dc=com" with "dc=elemer,dc=local"From the physical machine I bring up a webbrowser and type in 192.168.0.14/phpldapadmin It brings up the webpage and I type in my password (I set the LDAP password the same as the root).
LDAP laughs at me and says
"Unable to connect to LDAP server My LDAP Server
Error: Invalid credentials (49) for user
Failed to Authenticate to server
Invalid Username or Password"
The password is deffinetly right, I even created other virtual machines and repeated the process from scrath, used different approach at times but never managed to get it right.
If I run
ldapsearch -x
it gives me: "Result: 32 No such objectIf I run
ldapadd
and put in my password it says:
ldap_sasl_interactive_bind_s: INvalid credentials (49) additional info: SASL(-13): user not found: no secret in database
ldapsearch -x -LLL -H ldap:/// -b dc=example,dc=com dn
will giveNo such object (32)
-
runlevel0 about 8 yearsFollowed the howto and it does not work. I have reset the ldap password twice using dpkg-reconfigure, that's what's written in the solution. No luck thus. I have also restarted Apache and the slapd twice to force it to reread the documentation. Intriguing. I'll of course post a solution it I find one... even it is changing the LDAP admin GUI ;)
-
wjandrea about 7 yearsI fixed up this answer, but I don't know anything about networking/servers, so someone should probably check my edit to make sure everything's OK.
-
Grant Curell over 3 yearsThat first link is dead now.