Wednesday, June 27, 2012

Install NIS Server on Ubuntu Desktop 10.10


on the NIS Server


apt-get install portmap


restart


update-rc.d portmap defaults 10


apt-get install nis


when asked for domain it is sourav.com for my case


nano /etc/default/nis


NISSERVER=master


NISCLIENT=false


nano /etc/ypserv.securenets


#This line give adjust to anybody.Please adjust
255.255.255.0    192.168.10.0


nano /var/yp/Makefile


ALL =   passwd group hosts




service portmap restart


service nis restart


nano /usr/lib/yp/ypinit -m
out shadow in between passwd and group




/usr/lib/yp/ypinit -m


master nis server is souravubuntu


ctrl + d


and then press y and you are done




useradd -d /home/sougata -m sougata


passwd username


and set the password


c /var/yp


make




on the NIS Client


apt-get install portmap




domain will be sourav.com


nano /etc/hosts


add


192.168.10.10    souravubuntu   souravubuntu.sourav.com


nano /etc/yp.conf


nano /etc/nsswitch.conf


and change the 




passwd: compat
group: compat
shadow: compat


section to


passwd: nis compat
group:  nis compat
shadow: nis compat


to allow users to login graphically in anis environment change the permission of the home folder


chmod 777 /home




Edit /etc/passwd to add a line at the end saying:


+: : : : : :


Edit /etc/group to add a line at the end saying:


+: : :


Edit /etc/shadow to add a line at the end saying:


+: : : : : : : : 




restart and it's done


log in and test using command 


ypcat passwd

No comments:

Post a Comment