Configure LDAP Client

Configure LDAP Client in order to share users' accounts in your local networks.

[1] Install OpenLDAP Client.

[[email protected] ~]# dnf install openldap-clients authselect sssd sssd-ldap oddjob-mkhomedir -y

# swicth authentication provider to sssd
[[email protected] ~]# authselect select sssd with-mkhomedir --force

Backup stored at /var/lib/authselect/backups/2021-09-30-07-56-06.zy1Pze
Profile "sssd" was selected.
The following nsswitch maps are overwritten by the profile:
- passwd
- group
- netgroup
- automount
- services

Make sure that SSSD service is configured and enabled. See SSSD documentation for more information.

  - with-mkhomedir is selected, make sure pam_oddjob_mkhomedir module
  is present and oddjobd service is enabled
  - systemctl enable oddjobd.service
  - systemctl start oddjobd.service

[[email protected] ~]# vi /etc/openldap/ldap.conf

# add to the end: your LDAP server's URL and Suffix
URI ldap://ns1.futurelinux.org/
BASE dc=futurelinux,dc=org

[[email protected] ~]# vi /etc/sssd/sssd.conf

# create new
# replace [ldap_uri], [ldap_search_base] to your own environment value

[domain/default]
id_provider = ldap
autofs_provider = ldap
auth_provider = ldap
chpass_provider = ldap
ldap_uri = ldap://ns1.futurelinux.org/
ldap_search_base = dc=futurelinux,dc=org
ldap_id_use_start_tls = True
ldap_tls_cacertdir = /etc/openldap/certs
cache_credentials = True
ldap_tls_reqcert = allow

[sssd]
services = nss, pam, autofs
domains = default

[nss]
homedir_substring = /home

[[email protected] ~]# chmod 600 /etc/sssd/sssd.conf
[[email protected] ~]# systemctl restart sssd oddjobd
[[email protected] ~]# systemctl enable sssd oddjobd
Created symlink /etc/systemd/system/multi-user.target.wants/sssd.service β†’ /usr/lib/systemd/system/sssd.service.
Created symlink /etc/systemd/system/multi-user.target.wants/oddjobd.service β†’ /usr/lib/systemd/system/oddjobd.service.
[[email protected] ~]# exit
logout

Future OS 1 (Tesla)
Kernel 5.10.39-300.fx1.x86_64 on an x86_64 (tty1)

ns2 login: future      # LDAP user
Password:              # password
[[email protected] ~]$        # just logined

# changing LDAP password is common way with passwd
[[email protected] ~]$ passwd
Changing password for user future.
Current Password:      # current password
New password:          # new password
Retype new password:
passwd: all authentication tokens updated successfully.