Debian 10 Buster
Sponsored Link

NIS : NISクライアントの設定2019/07/29

NIS クライアントの設定です。
[1] サーバー側と同じ nis パッケージを指定してインストールします。
apt -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 クライアントとしての設定です。
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
# 最終行へ追記 [domain (ドメイン名) server (NISマスターサーバーのホスト名 or IPアドレス)]

domain server
vi /etc/nsswitch.conf
# 7行目:以下のように追記

passwd:         compat systemd nis
group:          compat systemd nis
shadow:         compat nis
gshadow:        files

hosts:          files dns nis

# 必要であれば以下も対応

vi /etc/pam.d/common-session
# 最終行に追記 ( ログイン時にホームディレクトリを自動作成 )

session optional skel=/etc/skel umask=077

systemctl restart rpcbind nis

Debian GNU/Linux 10 ttyS0

www login: buster     # NIS登録ユーザー
Linux 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5 (2019-06-19) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Creating directory '/home/buster'.
buster@www:~$     # ログインできた

# NISパスワード変更は以下の通り

Changing NIS account information for buster on
Please enter old password:
Changing NIS password for buster on
Please enter new password:
Please retype new password:

The NIS password has been changed on