OpenLDAP : LDAP クライアントの設定2023/11/17 |
LDAP サーバーのユーザーアカウント情報を共有できるように LDAP クライアントとしての設定をします。
|
|
[1] | OpenLDAP クライアントをインストールして設定します。 |
[root@node01 ~]#
dnf -y install openldap-clients sssd sssd-ldap oddjob-mkhomedir # 認証プロバイダーを sssd に切り替え [root@node01 ~]# authselect select sssd with-mkhomedir --force
Backup stored at /var/lib/authselect/backups/2023-11-17-00-58-04.G7dj22 Profile "sssd" was selected. 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 and active - systemctl enable --now oddjobd.service
[root@node01 ~]#
vi /etc/sssd/sssd.conf # 新規作成 # [ldap_uri], [ldap_search_base] は自身の環境に置き換え [domain/default] id_provider = ldap autofs_provider = ldap auth_provider = ldap chpass_provider = ldap ldap_uri = ldap://dlp.srv.world/ ldap_search_base = dc=srv,dc=world 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 chmod 600 /etc/sssd/sssd.conf [root@node01 ~]# systemctl restart sssd oddjobd [root@node01 ~]# systemctl enable sssd oddjobd
[root@node01 ~]#
logout Fedora Linux 39 (Server Edition) Kernel 6.5.9-300.fc39.x86_64 on an x86_64 (ttyS0) Web console: https://node01.srv.world:9090/ or https://10.0.0.51:9090/ node01 login: redhat # LDAP ユーザー Password: # パスワード Creating home directory for redhat. [redhat@node01 ~]$ # ログインできた # LDAP パスワードの変更方法は通常通り [redhat@node01 ~]$ Changing password for user redhat. Current Password: # 現在のパスワード New password: # 新しいパスワード Retype new password: passwd: all authentication tokens updated successfully. |
Sponsored Link |