« Advertisements | Main | Blog Roll Cleanup »

January 13, 2004

Geek Post

This is one of those things that you only do occasionally and I could not find my doco anywhere and Google was not all that helpful so I figured I would tell you lot all about it. At least next time Google should be able to find the answer quite quickly :-)

Problem: Adding a NIS slave server to an existing NIS setup.

Part I: Create the NIS slave server (easy)

slave# ypinit -c
(Fill in names of servers as required)
slave# ypbind -ypsetme
slave# ypset ypmaster
(Where ypmaster is the name of your master server)
slave# ypcat -k ypservers
(Make sure you can see the maps)
slave# ypinit -s
(Select all the default options)

So far so good - but the main server doesn't yet know about you (so maps will not propagate properly).

Part II: Diddling the master server (huh?)

master# cd /var/yp/`domainname`
master# makedbm -u ypservers > ../ypservers
(Add new server to the END of ../ypservers)
master# makedbm ../ypservers ypservers
master# ypcat -k ypservers

Looks easy but I could not find the relevant references in the on-line doco or the man pages. Now you can all do it as well. Let me return you to your regular non-geek program.

Posted by Ozguru at January 13, 2004 01:01 PM


Comments