(Please read this post first: http://michael-ambrus-tipps.blogspot.com/2006/11/nis.html)
This contains minimum information to set up NIS and NFS services.
NFS
1)
make sure you have the nfs-kernel-server package installed and running
2)
Add this entry in the file /etc/exports
/home 192.168.0.0/255.255.255.0(rw)
NIS
1) Modify the file /var/yp/Makefile to the following:
*)
< MINUID=1000
< MINGID=1000
---
> MINUID=4
> MINGID=500
*)
< MERGE_PASSWD=false
---
> MERGE_PASSWD=true
*)
< merge_group="false"
---
> MERGE_GROUP=true
*)
< ALIASES = /etc/aliases
---
> ALIASES = /etc/aliases.yp
*)
< GROUP = $(YPPWDDIR)/group
< PASSWD = $(YPPWDDIR)/passwd
---
> GROUP = $(YPPWDDIR)/group.yp
> PASSWD = $(YPPWDDIR)/passwd.yp
3) The NIS domain
(This differs from other distributions)
Set the NIS domain in the file
/etc/defaultdomainypdomain.logiccroft.de
4) Configure NIS service to be a server
Edit the file
/etc/default/nisNISSERVER=masterYou might consider setting
NISCLIENT=false..but you can leave it until were done testing.
If you do want to test the domainserver locally, you'll have to add the followin line in /etc/yp.conf:
ypserver 192.168.0.2(Please use the IP number and not IP name for security reasons and for ease of setting up and usa in case nameservice is broken).
5) build the service database
cd /etc
cp aliases aliases.ypcp group group.ypcp passwd passwd.yp(edit each destination file above and remove unwanted entries)
cd /usr/lib/yp./ypinit -m6) Test the service locally - Optional
/etc/init.d/nis stop/etc/init.d/nis startypcat passwd
7) Test the service on a client
Log in as root on the client and:
/etc/nfs stop/etc/nfs start/etc/nis stop /etc/nis startRepeat the process as in 6)