NetBSD rules - Go to the first, previous, next, last, above section, table of contents.
Setting up a machine as a NIS-client, you need to know the NIS-domain's
name, into which the machine is about to belong. This domainname has
nothing to do with the machine's DNS-domainname, it's just a unique
identifier for all the machines in the same NIS-domain to know them they
belong together (and to a certain server).
Do the following steps to setup a machine as NIS client:
- Domainname:
First, put the NIS-domain's name in `/etc/defaultdomain'.
echo our.nis.domain >/etc/defaultdomain
- `/etc/passwd' (and friends):
Put a line in the password file with the login-name consisting of a
single
+
and all the other fields empty.
+:::::::::
This line tells the programs reading `/etc/passwd' to look for more
entries using NIS. (Use vipw
to edit, as usual. No editing of
`/etc/passwd' by hand!)
- `/etc/group':
Also, to enable programs scanning through `/etc/group' for getting
the NIS' `group'-file, add the following line to `/etc/group':
+:::
- `/etc/resolv.conf':
Add a line saying "
lookup yp
" to `/etc/resolv.conf', if you
want to use DNS too (for hosts not in the hosts
NIS-map, make the
line look like "lookup yp dns
". Please see resolv.conf
(5) for a
more detailled description.
- `/etc/rc':
You'll have to uncommet a few lines in `/etc/rc', please refer to
section 3.5.2 `/etc/rc'.
- `/var/yp':
Create the directory `/var/yp':
# mkdir /var/yp
- Reboot:
Restart your system to take all the changes into effect and to start the
NIS-client daemon.
- Check!
Try if everything is ok:
- See if you're connected to the right (or any) NIS server:
ypwhich
- Try to get the NIS-server's `passwd'- and `group'-file:
ypcat passwd
ypcat group
- If all this works well, try to see if your system also scans the
NIS-`passwd' properly, not only the local `/etc/passwd'. Do
this by logging in as a user only kept in the NIS-`passwd' and not
in `/etc/passwd'.
NetBSD rules - Go to the first, previous, next, last, above section, table of contents.