NISクライアントとしての設定2011/04/30 |
NISクライアント側の設定です。 |
|
[1] | サーバー側と同じ 'nis' パッケージを指定してインストールします。 |
root@www:~# aptitude -y install nis portmap Preconfiguring packages ... # インストール中、NISドメインの設定画面が出るのでドメイン名を入力 |
[2] | NISクライアントとしての設定をします。 |
root@www:~# vi /etc/yp.conf # # yp.conf Configuration file for the ypbind process. You can define # NIS servers manually here if they can't be found by # broadcasting on the local net (which is the default). # # See the manual page of ypbind for the syntax of this file. # # IMPORTANT: For the "ypserver", use IP addresses, or make sure that # the host is in /etc/hosts. This file is only interpreted # once, and if DNS isn't reachable yet the ypserver cannot # be resolved and ypbind won't ever bind to the server. # ypserver ypserver.network.com # 最終行へ追記 [domain (ドメイン名) server (NISマスターサーバーのホスト名 or IPアドレス)] domain srv.world server drv.srv.world root@www:~# vi /etc/nsswitch.conf passwd: compat nis # 7行目:追記 group: compat nis # 追記 shadow: compat nis # 追記 hosts: files dns nis # 追記 # 必要であれば以下も対応 root@www:~# vi /etc/pam.d/common-session # 最終行に追記 ( ログイン時にホームディレクトリを自動作成 ) session optional pam_mkhomedir.so skel=/etc/skel umask=077 root@www:~# www login: ubuntu # NISに登録されたユーザー Password: Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-8-generic x86_64) * Documentation: https://help.ubuntu.com/ The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Creating directory '/home/ubuntu'. ubuntu@www:~$ # ログインできた ubuntu@www:~$ drv.srv.world ubuntu@www:~$ ypcat passwd ubuntu:x:1001:1001:ubuntu,,,:/home/ubuntu:/bin/bash narwhal:x:1000:1000:narwhal,,,:/home/narwhal:/bin/bash ubuntu@www:~$ ypcat hosts 10.0.0.39 drv.srv.world drv 127.0.0.1 localhost 10.0.0.39 drv.srv.world drv ubuntu@www:~$ # NISパスワード変更 Changing NIS account information for ubuntu on drv.srv.world. Please enter old password: Changing NIS password for ubuntu on drv.srv.world. Please enter new password: Please retype new password: The NIS password has been changed on drv.srv.world. ubuntu@www:~$ # 変更完了
|
Sponsored Link |
|