SUSE Support

Here When You Need Us

slapd.service not enabled/failed after upgrade from SLES 11 SP4 to SLES 15

This document (000019711) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server SLES 15 SP2
​​​​​SUSE Linux Enterprise Server SLES 15 SP1
SUSE Linux Enterprise Server SLES 15
SUSE Linux Enterprise Server SLES 11 SP4
 

Situation

After upgrading from SLES 11 SP4 to SLES 15 the openldap server (slapd) is not running.
When checking for the slapd.service it is not enabled at all. 

Other related services that do use the local LDAP server are also not starting or not working properly, like postfix, dhcpd, bind ,samba etc.

Resolution

Please follow the next steps very carefully.
 
1. Create the file /etc/openldap/slapd.conf.fixmodule  with the following content :
modulepath /usr/lib64/openldap
moduleload back_mdb.la
moduleload back_hdb.la
moduleload back_bdb.la
2. import the settings to slapd.d config structure
cd /etc/openldap
slaptest -f slapd.conf.fixmodule -F slapd.d
3. check if  the directory /var/run/slapd  exists and change the access rights and remove the old pid/args files as needed :
chgrp ldap /var/run/slapd
chmod g+w /var/run/slapd
rm /var/run/slapd/.*
4.  enable and start slapd
systemctl enable slapd.service
systemctl start slapd.service
5. create a file /etc/openldap/fix-statefiles.ldif to modify the location of pid and args files
dn: cn=config
changetype: modify
replace: olcArgsFile
olcArgsFile: /run/slapd/slapd.args
-
replace: olcPidFile
olcPidFile: /run/slapd/slapd.pid
6. apply the changes
ldapmodify -Y external -H ldapi:// -f fix-statefiles.ldif
7. restart slapd
systemctl restart slapd.service
8. verify slapd is running 
systemctl status slapd.service

Cause

The newer slapd is build with the database backends as loadable modules, however the slapd from SLES11 SP4 had the databases built in.

As such a change to the configuration is needed to load the database modules after the migration. In addition,  the location for the PID and ARGS file has changed on newer SLES version from /var  to /run  while the old location is still configured and needs to be changed to the new location.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000019711
  • Creation Date: 15-Sep-2020
  • Modified Date:25-Sep-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.