Debian 10 Buster
Sponsored Link

NIS : Configure NIS Slave2019/07/29

Configure NIS Slave Server to continue NIS service if NIS master server would be down.
+----------------------+          |          +----------------------+
| [    NIS Server    ] | || [    NIS Client    ] |
|    +----------+----------+    |
|                      |          |          |                      |
+----------------------+          |          +----------------------+
+----------------------+          |
| [     NIS Slave    ] | |
|   +----------+
|                      |

[2] Configure as a NIS Slave Server.
vi /etc/default/nis
# line 6: change (set NIS slave)

vi /etc/ypserv.securenets
# This line gives access to everybody. PLEASE ADJUST!
# comment out

# add to the end: IP range you allow to access

vi /etc/hosts       localhost
# add own IP for NIS        node01

systemctl restart nis

# sync with NIS master server

/usr/lib/yp/ypinit -s

We will need a few minutes to copy the data from
Transferring group.bygid...
Trying ypxfrd ... success
At this point, make sure that /etc/passwd and /etc/group have
been edited so that when the NIS is activated, the data bases you
have just created will be used, instead of the /etc ASCII files.
NIS master server is also required to be a NIS client. Configure NIS master server as a NIS Client, refer to here.
[4] Configure on NIS master server for new NIS Slave.
vi /var/yp/Makefile
# line 23: change

# update NIS database

/usr/lib/yp/ypinit -m

At this point, we have to construct a list of the hosts which will run NIS
servers. is in the list of NIS server hosts.  Please continue to add
the names for the other hosts, one per line.  When you are done with the
list, type a <control D>.
        next host to add:
        next host to add:   # specify NIS slave
        next host to add:                     # Ctrl + D key
The current list of NIS servers looks like this:

Is this correct?  [y/n: y] y

..... has been set up as a NIS master server.

Now you can run ypinit -s on all slave server.
[5] Configure on NIS Client to bind NIS slave, too.
vi /etc/yp.conf
# add slave server's setting to the end

domain server
domain server
systemctl restart nis
Matched Content