服务器端配置:
[root@tian ~]# useradd -d /nishome/user1 user1
[root@tian ~]# passwd user1
[root@tian ~]# useradd -d /nishome/user2 user2
[root@tian ~]# passwd user2
[root@tian ~]# cd /var/yp
[root@tian yp]# make(重新进行导入)
[root@tian ~]# vim /etc/exports
/home 192.168.10.0/255.255.255.0(rw,sync)
[root@tian ~]# service nfs restart
[root@tian ~]# exportfs -rv
[root@tian Server]# rpm -ivh ypserv-2.19-5.el5.i386.rpm
[root@tian Server]# chkconfig --list |grep yp
[root@tian Server]# chkconfig ypserv on
[root@tian Server]# chkconfig yppasswdd on
[root@tian ~]# vim /var/yp/Makefile
23:NOPUSH=ture
32:MINUID
33:MINGID
117:all:passwd group hosts \
[root@tian ~]# vim /etc/sysconfig/network
NISDOMAIN=rhce
[root@tian ~]# init 6
[root@tian ~]# cd /var/yp
[root@tian yp]# /usr/lib/yp/ypinit –m
配置客户端:
[root@tian ~]# mkdir /nishomeu
[root@tian ~]# authconfig-tui
nis nis域名(rhce) 服务器地址:192.168.10.36
[root@tian ~]# mount 192.168.10.36:/nishome /nishome
自动挂载到服务器
[root@tian ~]# vim /etc/auto.master
/nishome /etc/auto.nis6 --time=60
[root@tian ~]# cp /etc/auto.misc /etc/ auto.nis6
user1 -rw,soft,intr 192.168.10.36:/nishome/user1
user2 -rw,soft,intr 192.168.10.36:/nishome/user2
或者
* -rw,soft,intr 192.168.10.36:/nishome/&