Skip to Content

Integrate OpenLdap with CentOS using SSSD

How to integrate OpenLdap with Centos 8 using SSSD?

Run the following commands to install the SSSD packages

[root@jumpserver ~]# yum install sssd sssd-client nscd -y

Add ldap_search_base,ldap_default_bind_dn,ldap_default_authtok,ldap_uri to /etc/sssd/sssd.conf

services = nss, pam
config_file_version = 2
domains = default


offline_credentials_expiration = 60

ldap_id_use_start_tls = False
cache_credentials = True
ldap_search_base = dc=ldap,dc=ez,dc=com
id_provider = ldap
auth_provider = ldap
chpass_provider = ldap
access_provider = ldap
ldap_uri = ldap://
ldap_default_bind_dn = cn=admin,dc=ldap,dc=ez,dc=com
ldap_default_authtok = paswword
ldap_search_timeout = 50
ldap_network_timeout = 60
ldap_access_order = filter
ldap_access_filter = (objectClass=posixAccount)
override_shell = /usr/local/bin/ezsh

Restart sssd and nscd using below commands.

[root@jumpserver ~]# service sssd restart && service nscd restart

When sssd restart fails, make sure to change the permissions of sssd.conf to 600

[root@jumpserver ~]# chmod 600 /etc/sssd/sssd.conf

Enable autocreate home directory on login by the following command  

authconfig --enablemkhomedir --update

Now run the id / finger command and see whether you are able to get LDAP user details 

[root@jumpserver ~]# finger marc

Login: marc             Name: Marc c

Directory: /home/marc   Shell: /usr/local/bin/ezsh

Last login Wed Jun 13 05:02 (EDT) on pts/1 from

No mail.

No Plan.

[root@jumpserver ~]# id marc

uid=1001(marc) gid=20001(domain users) groups=1547600513(domain users)

root@gateway ~]# getent passwd marc
marc:*:1701601108:1701600513:marc user:/home/[email protected]:/usr/local/bin/ezsh


Use the below command to clear the cache of the user.

[root@jumpserver ~]#  sss_cache -u username

Related Information

Integrate Windows AD on RHEL 8 using SSSD

Integrate Windows AD with Centos 8 using SSSD