0

I am trying to restart an LDAP server running on a CentOS machine so as to apply new SSL certificates. I have tracked the service to being run as

/usr/sbin/ns-slapd -D /etc/dirsrv/slapd-<instance> -i /var/run/dirsrv/slapd-<instance>.pid -w /var/run/dirsrv/slapd-<instance>.startpid

How can I restart this service? My ideas so far are to either reboot the whole computer as this service is set to run at startup. My other idea is to run that same command again however I have no guarantee that will work.

These commands service ldap\ldaps restart both return unrecognized service. No variation of ldap, ldaps, slapd or ns-slapd appear in the output of chkconfig --list. Should have put that in my question

  • The same way you restart any other service on CentOS? sudo systemctl restart ldap on v7, or sudo service ldap restart on v5, v6. Or sudo systemctl list-units --type=service on v7 to list all services and find its name, aka sudo chkconfig --list on v5, v6 – TessellatingHeckler May 28 '18 at 7:13
  • @TessellatingHeckler These commands service ldap\ldaps restart both return unrecognized service. No variation of ldap, ldaps, slapd or ns-slapd appear in the output of chkconfig --list. Should have put that in my question. – Stringers May 28 '18 at 7:19
0

Assuming 389 Directory server:

The systemd service name is dirsrv, so systemctl restart dirsrv should do what you want in the proper way.

  • Yes you are right about the server being 389. So does restarting the service as you have said also result in my command being run? – Stringers May 28 '18 at 23:16
0

The RedHat guide lists this command as the correct one /usr/lib/dirsrv/slapd-instance/start-slapd

On 64 bit computers it may be located in /usr/lib64/dirsrv/slapd-instance/start-slapd which was the case in my situation.

  • You should use systemctl to control services. – Sven May 28 '18 at 8:03

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.