Ubuntu 18.04
Sponsored Link

Configure NIS Client
2018/06/06
 
Configure NIS Client to bind NIS Server.
[1] Install NIS System.
root@www:~#
apt -y install nis
Preconfiguring packages ...
# input your domain name

 +----------------------------| 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] Configure as a NIS Client.
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
# add to the end: [domain name] [server] [NIS server's hostname]

domain srv.world server dlp.srv.world
root@www:~#
vi /etc/nsswitch.conf
# line 7: add like follows

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

hosts:          files dns nis

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

root@www:~#
vi /etc/pam.d/common-session
# add to the end

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

root@www:~#
systemctl restart rpcbind nis

root@www:~#
www login: bionic     # NIS user
Password:
Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-20-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Wed Jun  6 14:05:51 JST 2018

  System load:  0.0               Processes:           94
  Usage of /:   6.2% of 28.45GB   Users logged in:     0
  Memory usage: 3%                IP address for ens3: 10.0.0.31
  Swap usage:   0%

 * Meltdown, Spectre and Ubuntu: What are the attack vectors,
   how the fixes work, and everything else you need to know
   - https://ubu.one/u2Know

18 packages can be updated.
10 updates are security updates.

Creating directory '/home/bionic'.
bionic@www:~$     # just logined

# changing NIS password is like follows

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

The NIS password has been changed on dlp.srv.world.

bionic@www:~$
Matched Content