Ubuntu 22.04
Sponsored Link

NIS : Configure Client
Configure NIS Client to bind NIS Server to login with NIS user account.
[1] Install NIS System.
apt -y install nis
[2] Configure as a NIS Client.
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
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

vi /etc/defaultdomain
# create new : set NIS domain name

# set follows if needed (create home directory automatically if none)

vi /etc/pam.d/common-session
# add to the end

session optional        pam_mkhomedir.so skel=/etc/skel umask=077

systemctl restart rpcbind nscd ypbind

systemctl enable rpcbind nscd ypbind

node01 login: jammy     # NIS user
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:
  Swap usage:   0%


Creating directory '/home/jammy'.

# changing NIS password is like follows

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.

Matched Content