NIS : Configure Client2022/09/09 |
Configure NIS Client to bind NIS Server to login with NIS user account.
|
|
[1] | Install NIS System. |
root@node01:~# apt -y install nis
|
[2] | Configure as a NIS Client. |
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 # add to the end: [domain name] [server] [NIS server's hostname] domain srv.world server dlp.srv.world
root@node01:~#
vi /etc/nsswitch.conf # line 7: add like follows passwd: files systemd nis group: files systemd nis shadow: files nis gshadow: files hosts: files dns nis
root@node01:~#
vi /etc/defaultdomain # create new : set NIS domain name srv.world # set follows if needed (create home directory automatically if none) root@node01:~# vi /etc/pam.d/common-session # add to the end session optional pam_mkhomedir.so skel=/etc/skel umask=077
root@node01:~#
systemctl restart rpcbind nscd ypbind root@node01:~# systemctl enable rpcbind nscd ypbind root@node01:~# node01 login: jammy # NIS user Password: Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-25-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage System information as of Fri Sep 9 00:20:31 UTC 2022 System load: 0.0068359375 Processes: 124 Usage of /: 25.9% of 26.68GB Users logged in: 0 Memory usage: 5% IPv4 address for enp1s0: 10.0.0.51 Swap usage: 0% ..... ..... Creating directory '/home/jammy'. jammy@node01:~$ # changing NIS password is like follows focal@node01:~$ Changing NIS account information for jammy on dlp.srv.world. Please enter old password: Changing NIS password for jammy on dlp.srv.world. Please enter new password: Please retype new password: The NIS password has been changed on dlp.srv.world. jammy@node01:~$ |
Sponsored Link |