2

What is the correct /etc/yp.conf format for indicating a NIS domain has more than one NIS server available to it?

Also, how does the client decide to look for another server?

I've tried this:

domain NIS server nis1
domain NIS server nis2

...but everything binds to nis1. If I reboot nis1, everything just hangs until nis1 comes back, I don't see them seeking new servers.

For security reasons, broadcast definitions are not acceptable.

Edit: perhaps I'm unclear. My question is: I have two nis servers, one master and one slave. How do I configure CentOS client X such that it has access to both nis servers?

  • ...and yes, I'm aware of tripping the irony-detector by using "NIS" and "security" in the same post. The reasons are stupid, but I still have to deal with them. – David Mackintosh Jun 16 '14 at 20:44
1

When setting up NIS you have the option of adding additional slave servers. This is how you'd approach adding multiples. Assuming the slave servers are already clients to the NIS master:

$ ypwhich  

You should be able to run this command to enlist a given server as a slave:

$ /usr/lib/yp/ypinit -s <nis master hostname>

excerpt of usage

$ sudo /usr/lib/yp/ypinit --help
usage:
  ypinit -m
  ypinit -s master

where -m is used to build the data bases on a master NIS server,
and -s is used for a slave data base. master must be an existing
reachable NIS server.

Updating the server list

Once you've added a slave you'll need to add the server's hostname to this file on the NIS master:

#
# File: /var/yp/ypservers
#
master
nisslave

Then on the NIS clients:

#
# File: /etc/yp.conf (nis client)
#
domain NIS-NETWORK server 192.168.1.100
domain NIS-NETWORK server 192.168.1.254

NOTE: Be sure to run the make command on the NIS master to update the NIS maps database. If you have additional questions take a look at the tutorial in the references section below. It'll guide you through the details of setting up a slave and a whole lot more.

References

| improve this answer | |
  • Sorry, perhaps I'm unclear. I have to NIS servers, one master and one slave. How do I tell client X that it has access to two NIS servers? – David Mackintosh Jun 17 '14 at 13:38
  • @DavidMackintosh - see updates, let me know if that helps. – slm Jun 17 '14 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.