自作クラスタ計算機:openldapを使ったldapサーバの基本設定

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
自作クラスタ計算機:openldapを使ったldapサーバの基本設定 [2026/07/09 01:21] – [ユーザーの追加] koudai自作クラスタ計算機:openldapを使ったldapサーバの基本設定 [2026/07/09 02:07] (current) – [LDAPクライアント] koudai
Line 233: Line 233:
     * LDAP server URI: ldap://192.168.0.1/     * LDAP server URI: ldap://192.168.0.1/
     * LDAP server search base: dc=cluster,dc=internal     * LDAP server search base: dc=cluster,dc=internal
-    * Name services to configure: passwd, group, shadow, hosts (スペースキーでチェックを入れられます) +    * Name services to configure: passwd, group, shadow (スペースキーでチェックを入れられます) 
-  - 管理ノードのみ実行<code>+  - 管理ノードのみ)PAM(Pluggable Authentication Modules)の認証設定<code>
 $ sudo pam-auth-update $ sudo pam-auth-update
 </code> </code>
     * 「LDAP Authentication」を有効化(通常は自動で有効化済み)     * 「LDAP Authentication」を有効化(通常は自動で有効化済み)
     * Create home directory on login を有効化     * Create home directory on login を有効化
-  - nscd+nslcdを再起動<code>+  - (管理ノードのみ)nscd+nslcdを再起動<code>
 $ sudo systemctl restart nslcd nscd $ sudo systemctl restart nslcd nscd
 </code> </code>
Line 250: Line 250:
 </code> </code>
     * uidとgidが見えます。     * uidとgidが見えます。
-  - ホストが反映されているか確認<code> 
-$ getent hosts 
-</code> 
   - ユーザーに切り替えるには<code>   - ユーザーに切り替えるには<code>
 $ su - taro $ su - taro
Line 353: Line 350:
  
  
-==== 計算ノードでの作業 ====+==== 管理・計算ノードでの作業 ====
  
 libnss-ldapdをインストールするときにhostsも共有するか聞かれますが、そこで共有しないようにしてしまった人向け。 libnss-ldapdをインストールするときにhostsも共有するか聞かれますが、そこで共有しないようにしてしまった人向け。
  
 +
 +  - /etc/nsswitch.confのhostsにldapを追加<file - /etc/nsswitch.conf>
 +# /etc/nsswitch.conf
 +#
 +# Example configuration of GNU Name Service Switch functionality.
 +# If you have the `glibc-doc-reference' and `info' packages installed, try:
 +# `info libc "Name Service Switch"' for information about this file.
 +
 +passwd:         files systemd ldap
 +group:          files systemd ldap
 +shadow:         files systemd ldap
 +gshadow:        files systemd
 +
 +hosts:          files dns ldap
 +networks:       files
 +
 +protocols:      db files
 +services:       db files
 +ethers:         db files
 +rpc:            db files
 +
 +netgroup:       nis
 +</file>
 +  - nscd, nslcdの再起動<code>
 +$ sudo systemctl restart nslcd nscd
 +</code>
 +  - ホストが反映されているか確認<code>
 +$ getent hosts
 +</code>
  
  
自作クラスタ計算機/openldapを使ったldapサーバの基本設定.1783527672.txt.gz · Last modified: 2026/07/09 01:21 by koudai