How can I set up a machine to use the NIS system?


  1. edit /etc/rc.conf
  2. modify passwd files
  3. bind to a server

1. Edit /etc/rc.conf

Several lines need to be added to /etc/rc.conf so that the machine will know it is an NIS client upon system startup. Add these lines:

Different versions of BSD require either portmap or rpcbind running. I think older versions (4.x, perhaps 5.1) use portmap, whereas newer versions use rpcbind, but check the rc.conf(5) manpage to be certain. Depending, you will add either portmap_enable="YES" or rpcbind_enable="YES" to /etc/rc.conf, assuming it is not already present.

2. Modify passwd Files

Execute vipw and remove any user accounts on the system, such as jsterrel or smithfd. You'll need to save system accounts, such as root, www, and nobody. At the bottom of the file, add the following line, save, and quit:

Also, add the following line to the top of the /etc/group:

3. Bind to a Server

Execute domainname dirt-cs to set the NIS Domain Name (not related to DNS), then execute ypbind to make sure you can bind to an NIS server. If ypwhich returns brutus or professor (the NIS servers), you're set; otherwise, try ypbind -m -S dirt-cs,professor,brutus. If ypwhich then returns brutus or professor, be sure to change the nis_client_flags variable in /etc/rc.conf.

Jeff Terrell 01/11/06