0

I have followed installing openLDAP from http://www.openldap.org/doc/admin24/quickstart.html and follow the tasks up to # 9. when I run [ su root -c /usr/local/libexec/slapd ] it asks for password and after I type the password no indication of if server has been started or not. When I run [ ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts ] I get this error [ ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) ] I can't figure it out what is the problem. Can anyone help?

Thanks

  • did it compile and build correctly? what linux distro/OS are you using? – Mark Regensberg Mar 6 '10 at 6:35
  • That is because you are trying to bind non-anonymously. Try this: ldapsearch -h ldapserver.example.com -p 389 -LLLx -b 'dc=example,dc=com' -s base – Nikolas Sakic Jun 19 '10 at 4:28
  • Instead of using -x use -LLLx – Nikolas Sakic Jun 19 '10 at 4:31
1

It may be that slapd finds your configuration invalid, and therefore doesn't start.

To test this, run slaptest, with the same options and permissions. This should output error messages if something is wrong with the config. So something like:

su root -c /usr/local/libexec/slaptest
1

try following commands to check whether slapd actually started:

netstat -ptnl #(provide list of all servers running)

something like below will come:

Proto Recv-Q    Send-Q   Local Address         Foreign Address  State   PID/Program name
tcp        0        0      0.0.0.0:1394           0.0.0.0:*      LISTEN      24000/slapd
tcp        0        0      139.54.136.132:1395     0.0.0.0:*     LISTEN      23927/slapd

OR

ps -ef |grep slapd

something like below will come:

root 9147 1  0 16:13 ?  00:00:00 slapd -h ldap://172.21.140.73:1389 -f /usr/local/etc/openldap2-4-30/slapd.conf
root     29285 11091  0 17:16 pts/6    00:00:00 grep slapd

If slpad process is not listed by any of the above commands it means slapd is not started.

In this case you can try to run slpad with debug options:

slapd -d -1

-1 will enable all debugging. There are various other options you can google for these.

0

When you run ps is the slapd process listed? What is in the logs?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.