ldapstop -d number
ldapstop -i id
For each daemon being stopped, this command looks for the slapd process ID in /var/ldap/pids/pidfile, where pidfile is generated from the pathname of the configuration file used by slapd. For example, if a slapd process is started using the file, /etc/ldap/adm/test/slapd.conf, then the slapd process will create the file /var/ldap/pids/_etc_ldap_adm_test_slapd.conf.
The file is created when the slapd daemon starts. If this file is missing, then ldapstop will not be able stop the slapd daemon: the administrator should find the appropriate slapd process and use kill -TERM pid to stop the daemon.
slurpd PID information is written to the file /var/ldap/pids/slurpd/pidfile, where pidfile is generated in the same way as the example slapd file above.
Note that if two slapd processes share a port, ldapstop will not stop both processes.
ldapstop all is used by /etc/init.d/ldap to stop all LDAP daemons.
Configuring and administering LDAP