解説
NISサーバを利用するためのNISクライアントの設定を行います。
インストール
ypbind パッケージがインストールされていれば、 パッケージの追加インストールは不要です。
設定
1.NISクライアントの設定
# cd /etc/
# vi yp.conf
# vi yp.conf
ファイル名: /etc/yp.conf
※ファイルの末尾に追加※
domain ranonet.ne.jp server 192.168.0.11
domain ranonet.ne.jp server 192.168.0.11
2ネームサービススイッチの設定ファイル変更
ユーザアカウントのみNISサーバで管理する設定としています。 NISサーバに接続できない、NISサーバに必要な情報が存在しないなど NISサーバを正常に利用できない場合はローカルの設定ファイルを 参照するものとしています。
# cd /etc/
# vi nsswitch.conf
# vi nsswitch.conf
ファイル名: /etc/nsswitch.conf
※該当箇所を変更※
passwd: files
shadow: files
group: files
↓変更
passwd: nis files
shadow: nis files
group: nis files
passwd: files
shadow: files
group: files
↓変更
passwd: nis files
shadow: nis files
group: nis files
3.NISクライアントの起動ランレベル変更
OSの起動に併せてデーモンを自動起動する設定に変更します。
# chkconfig ypbind on
以上で設定が終了しましたのでrcスクリプトを使用してデーモンを起動します。
# /etc/rc.d/init.d/ypbind start
Binding to the NIS domain: [ OK ]
Listening for an NIS domain server..
Binding to the NIS domain: [ OK ]
Listening for an NIS domain server..
