Wednesday, June 27, 2012

Install NIS Server on Ubuntu Desktop 10.10

on the NIS Server

apt-get install portmap


update-rc.d portmap defaults 10

apt-get install nis

when asked for domain it is for my case

nano /etc/default/nis



nano /etc/ypserv.securenets

#This line give adjust to anybody.Please adjust

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


on the NIS Client

apt-get install portmap

domain will be

nano /etc/hosts

add    souravubuntu

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