Preparation 2 virtual machines.

1. test two computer`s ip, hostname, and network configuration.





make sure the two computers can ping each other`s ip

2.install ypserv on

yum install –y ypserv

vim /etc/ypserv.conf

change the last line, delete# at the beginning to open the listening port

service ypserv start

/usr/lib/yp/ypinit –m

service ypserv restart

3. Set the ypbind on

authconfig –enablenis – –nisserver= –update

make sure selinux enable ypbind

setsebool -P allow_ypbind=1

now restart ypbind

service ypbind restart

to see if it is working properly

4.create some users on , change their passwords, then use login those users

[root@ls ~]# ssh’s password:
Last login: Sun May 30 22:52:14 2010 from
Could not chdir to home directory /home/tonyp: No such file or directory

we can see user tonyp-which is a user of can login through NIS. And because there is no NFS settings yet user tonyp can not find its home dir on