From ArchWiki
Revision as of 09:16, 7 May 2010 by Magus (talk | contribs) (Adding details on testing the NIS setup and configuring nsswitch.conf)
Jump to navigation Jump to search


NIS is a protocol developed by sun to allow one to defer user authentication to a server. The server software is in the ypserv package, and the client software is in the yp-tools package. ypbind-mt is also available, which is a multi threaded version of the client daemon.

Note: obviously this article is far from finished. hopefully in the future that will change, but in the meantime check the More resources section.

How to Setup NIS client

First step is to install the tools that you will need. This will provide you with the configuration files and general tools needed to use NIS.

# pacman -S yp-tools ypbind-mt

Next add your NIS domain name to the file /etc/conf.d/nisdomainname

If your NIS domainname has not already been set you can run this command to set it.

# /bin/domainname nis.domain

Now edit the /etc/yp.conf file and add your ypserver or nis server.

ypserver your.nis.server

Start the rpcbind and ypbind daemons (add them to your rc.conf file if you want it to start automatically).

# /etc/rc.d/rpcbind start
# /etc/rc.d/ypbind start

To test the setup so far you can run the command yptest:

# yptest

If it works you will, among other things, see the contents of the NIS user database (which is printed in the same format as /etc/passwd).

To actually use NIS to log in edit /etc/nsswitch.conf. Modify the lines for passwd, group and shadow:

passwd: compat
group: compat
shadow: compat

See section 7.5 of The Linux NIS HOWTO for further information on configuring /etc/nsswitch.conf.

More resources