Server
1. /etc/nsswitch.conf
e.g.
# cat /etc/nsswitch.conf
passwd: files nis
group: files nis
netgroup: files nis
...
2. vi /etc/defaultdomain
e.g.
# cat /etc/defaultdomain
agile.sz
注意:这个域名与主机的DNS域名是两个概念。这是基于管理的需要而设,与实际DNS可不相同。
3. /var/yp/Makefile
4. ypinit -m
5. 启动 /usr/lib/netsvc/yp/ypstart
6. 诊断
ypcat hosts
ypcat passwd
yp which -m Client
1. /etc/nsswitch.conf
e.g.
# cat /etc/nsswitch.conf
passwd: files nis
group: files nis
netgroup: files nis
...
2./etc/hosts
#app4:~% cat /etc/hosts
10.6.3.197 app4.sz
10.6.3.191 admin
3. /etc/defaultdomain
#app4:~% cat /etc/defaultdomain
agile.sz
注意:要与Server的设置相同。
4. ypinit -c
5./usr/lib/netSvc/yp.ypstart
根据所示,输入NIS Server的hostame:admin
6. 诊断
ypcat hosts
ypcat passwd
7.增加NIS用户:
login to nis server:admin
run
/var/yp/etc/adduser to add NIS users,
run /var/yp/etc/rsetpass to change Nis users password.
If you want to perm change and IP, you need to change files:
/etc/hosts
/etc/hostname.interfacename
depends on your network configuration, you might also need to change:
/etc/defaultrouter
/etc/netmasks
Reset the hostname---use this command:
uname -S newname
reboot