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
3. make -C /var/yp

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
5. Make your autofs config file(s) to look like this :

cat /etc/auto.master
/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
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

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

Reference :

No comments: