0

I am new to Red Hat Enterprise Linux 5.3(Tikanga) as well as to open ldap.As openldap comes by default with the red hat.So i have installed berkeley database db-5.3.15.tar.gz

Version of already installed OpenLdap: openldap-2.3.43-3.el5

When I am running slapd by command:

service ldap start

It is showing

Starting slapd: [ OK ]

but no slapd process is starting. Please suggest what is the problem.

Thanks.

Infotechie
  • 131
  • 2
  • 8
  • Any relevant log records? – Khaled Apr 24 '12 at 07:16
  • where can i see the log? – Infotechie Apr 24 '12 at 07:26
  • besides this already installed openldap. I have installed both openldap and berkley db and tried to run it through slapd instead of service ldap start but that is also not running. Is it something like on red hat linux we can run openldap through "service ldap start" only? – Infotechie Apr 24 '12 at 07:29

1 Answers1

1

first off, are you sure its not running by checking the following commands;

You can check that the ldap is actually running by using the command netstat -lntp | grep 389 and it should show something like this;

# netstat -lntp | grep 389
tcp        0      0 0.0.0.0:389                 0.0.0.0:*                   LISTEN      28783/slapd         
tcp        0      0 :::389                      :::*                        LISTEN      28783/slapd

If it is not running then try and start the command from the command line (so you can see any error messages to standard outout/error) like so;

# /usr/sbin/slapd -d 1
@(#) $OpenLDAP: slapd 2.3.43 (Feb 22 2012 15:59:04) $
        mockbuild@builder10.centos.org:/builddir/build/BUILD/openldap-2.3.43/openldap-2.3.43/build-servers/servers/slapd
daemon_init: listen on ldap:///
daemon_init: 1 listeners to open...
...
slapd starting

my log file seems to be located by default in /var/log/slapd.log , so that is the first place to look for additional information.

If it is definitely not starting, then you can edit the /etc/openldap/slapd.conf file to increase the logging activity with the loglevel command;

#<http://www.zytrax.com/books/ldap/ch6/#loglevel>
#loglevel 3333
#loglevel filter
#loglevel stats
#loglevel ACL
Tom
  • 10,886
  • 5
  • 39
  • 62
  • Thanks for the valuable information. It really helped me.Can you please guide how can I change the default port? – Infotechie Apr 24 '12 at 12:39
  • 2
    put something like `SLAPD_OPTIONS="-h ldap://localhost:12345"` in `/etc/sysconfig/ldap` – Tom Apr 24 '12 at 13:58
  • there is no such directory/file named ldap i.e. i am only able to get /etc/openldap/ Inside this there is not ldap options. Any idea? – Infotechie Apr 25 '12 at 04:31
  • i have run the following command and it worked: slapd -h ldap://localhost:12345 -f usr/local/openldap_2.4/slapd.conf. But now i have another query how can i know which BDB it is referring as there are two bdb one is default and other is installed by me? – Infotechie Apr 25 '12 at 06:06
  • Its dependent on how you configured the additional root. I'd need to see the slapd.conf file. You can award this answer and paste the slapd.conf in another question and link to it here, and ill take a look. – Tom Apr 25 '12 at 08:40
  • I have raised another question: http://serverfault.com/questions/382893/how-to-know-which-berkley-db-openldap-is-refering-to Please have a look and provide your suggestion. – Infotechie Apr 25 '12 at 09:16
  • re the `/etc/sysconfig/ldap` its not there by default, but you can create it and the `service ldap start` script looks in that file for addition options. You can open the `/etc/init.d/ldap` in a text editor and search for the `/etc/sysconfig` and `SLAPD_OPTIONS` strings for details on how those values are used. – Tom Apr 25 '12 at 09:50
  • the filename is actually `/etc/sysconfig/slapd` instead of `/etc/sysconfig/ldap` – ILMostro_7 Jun 01 '15 at 09:16