Ubuntu 15.04
Sponsored Link

NISクライアントの設定2015/05/25

 
NISクライアント側の設定です。
[1] サーバー側と同じ nis パッケージを指定してインストールします。
root@www:~#
apt-get -y install nis
Preconfiguring packages ...
# インストール中、NISドメインの設定画面が出るのでドメイン名を入力

# インストール後、自動的に起動を試みるが失敗するので、終わるまで待つか放っておいて別ウィンドウで設定開始する

 +----------------------------| Configuring nis |----------------------------+
 | Please choose the NIS "domainname" for this system. If you want this      |
 | machine to just be a client, you should enter the name of the NIS domain  |
 | you wish to join.                                                         |
 |                                                                           |
 | Alternatively, if this machine is to be a NIS server, you can either      |
 | enter a new NIS "domainname" or the name of an existing NIS domain.       |
 |                                                                           |
 | NIS domain:                                                               |
 |                                                                           |
 | srv.world_____________________________________________________________ |
 |                                                                           |
 |                                  <Ok>                                     |
 |                                                                           |
 +---------------------------------------------------------------------------+
[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 dlp.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:~#
systemctl restart nis

root@www:~#
Debian GNU/Linux 8 www.srv.world ttyS0
www login:
ubuntu
   
# NIS登録ユーザー

Password:
Welcome to Ubuntu 15.04 (GNU/Linux 3.19.0-18-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Mon May 25 21:16:58 JST 2015

  System load:  0.0               Processes:           79
  Usage of /:   4.9% of 25.23GB   Users logged in:     0
  Memory usage: 2%                IP address for eth0: 10.0.0.31
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.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.


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:~$    
# ログインできた
# NISパスワード変更は以下のようにする

ubuntu@www:~$
Changing NIS account information for ubuntu on dlp.srv.world.
Please enter old password:
Changing NIS password for ubuntu on dlp.srv.world.
Please enter new password:
Please retype new password:

The NIS password has been changed on dlp.srv.world.
関連コンテンツ