(三):NIS安装和配置
参见:http://www.chinaunix.net/bbsjh/3/13779.html
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
e.g.
#app4:~% cat /etc/hosts
10.6.3.197 app4.sz
10.6.3.191 admin
3. /etc/defaultdomain
e.g.
#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.
最新相关文章
发表评论