The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

As an Amazon Associate I earn from qualifying purchases.
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 FreeBSD NIS client setup
Author: Ross Dickey 
Date:   16-04-08 21:38

I found this article on setting up NIS on FreeBSD:

It's a bit outdated and doesn't work anymore. So I updated it, but I don't know where/how to submit it, or how to make the cool formatting. Here's the text for now in case someone needs it. Worksforme on 7.0-release. Not sure about forward/backward compatability:

Setting up the client
We are going to assume a few things about your setup. Your NIS domain is, and your NIS servers are nisserver1 (master) and nisserver2 (slave). Edit your /etc/rc.conf and add the following lines:

nis_client_flags="-s -S,nisserver1,nisserver2"

The spacing is important on some versions of FreeBSD, so be careful to keep the spacing correct.

Now, edit your /etc/group file, and add a + to the end (last line). It should look something like:


Editing the hosts file
Edit your /etc/hosts file and make sure you have the local machine, and both NIS servers in the list. Add a +:: to the end (last line). It should look something like this (you may not have to do this if you are a name server): localhost fridge nisserver1 nisserver2

Editing the nsswitch.conf file
Edit your /etc/nsswitch.conf file, and change these lines:
group: compat
passwd: compat
hosts: files dns

To this:
group: files nis
passwd: files nis
hosts: files dns nis

Editing the master.passwd file
Now do a vipw master.passwd, and add a +::::::::: to the end (last line) of the file. It should look something like this:

uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
xten:*:67:67::0:0:X-10 daemon:/usr/local/xten:/sbin/nologin
pop:*:68:6::0:0:Post Office Owner:/nonexistent:/sbin/nologin
nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/sbin/nologin

Do NOT edit the passwd file, and make sure you have the right number of :'s. Also, make sure you have the correct DNS settings in your /etc/resolv.conf file.

The easiest thing to do at this point is to reboot.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 

 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum