NIS : クライアントの設定2020/09/16 |
NIS クライアントの設定をして、NIS サーバーのユーザーアカウントでログインできるようにします。
|
|
[1] | サーバー側と同じ NIS システムをインストールします。 |
root@node01:~#
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 クライアントとしての設定です。 |
root@node01:~#
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@node01:~#
vi /etc/nsswitch.conf # 7行目:以下のように追記 passwd: files systemd nis group: files systemd nis shadow: files nis gshadow: files hosts: files dns nis # 最終行に追記 (初回ログイン時にホームディレクトリを自動作成) session optional pam_mkhomedir.so skel=/etc/skel umask=077 node01 login: focal # NIS 登録ユーザー Password: Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-42-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage System information as of Wed 16 Sep 2020 04:22:09 PM JST System load: 0.28 Processes: 134 Usage of /: 12.4% of 24.54GB Users logged in: 0 Memory usage: 5% IPv4 address for enp1s0: 10.0.0.51 Swap usage: 0% * "If you've been waiting for the perfect Kubernetes dev solution for macOS, the wait is over. Learn how to install Microk8s on macOS." https://www.techrepublic.com/article/how-to-install-microk8s-on-macos/ 11 updates can be installed immediately. 8 of these updates are security updates. To see these additional updates run: apt list --upgradable 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/focal'. focal@node01:~$ # ログインできた # NIS パスワード変更は以下の通り focal@node01:~$ hanging NIS account information for focal on dlp.srv.world. Please enter old password: Changing NIS password for focal on dlp.srv.world. Please enter new password: Please retype new password: The NIS password has been changed on dlp.srv.world. focal@node01:~$ |
Sponsored Link |
|