Friday, May 26, 2006

Quick and dirty NIS+NFS+AutoFS configuration for RH (RedHat) based distributions.
This will allow your Linux users to work in a distributed environment and have the warm roaming profile feeling.

~~ NOTE: Careful, work in progress. I'm editing the post from time to time ~~

On the server you go like this :
1. yum install ypserv
2. set nis domain in /etc/sysconfig/network
NISDOMAIN=your_nis
3. make -C /var/yp
4.

Where as on the client side, this is what you do :

1. yum install autofs
2. yum install ypbind
3. yum install portmap
4. Set nis domain in /etc/sysconfig/network
NISDOMAIN=your_nis
5. Make your autofs config file(s) to look like this :

cat /etc/auto.master
[snip]
/home/exports /etc/auto.home

cat /etc/auto.home
* NFS_SERVER_ADDRESS:/home/exports/&

6. Tell the system where to look for user info :

cat /etc/nsswitch.conf
[snip]
passwd: nis files
shadow: nis files
group: nis files

7. Make sure the needed network daemons awake on boot :
chkconfig --level 345 autofs on
chkconfig --level 345 ypbind on
chkconfig --level 345 portmap on

8. Set your NIS server
cat /etc/yp.conf
[snip]
ypserver ADDRESS_OF_YOUR_NIS_SERVER


You're done.
Reboot and witness the magic of the ages (; (NIS has been with us since the 80's).


Reference :
1. http://www.tldp.org/HOWTO/NIS-HOWTO/
2. http://userpages.umbc.edu/~jack/ifsm498/llb-nis.html
3. http://hq4ever.googlepages.com/NIS-NFS-Autofs.ppt