- 論壇徽章:
- 0
|
1.NIS介紹:NIS(網(wǎng)絡信息服務)也稱YP(Yellow Pages)協(xié)議,是一個提供目錄服務的RPC(遠程過程調(diào)用)應用服務。通過它,就可以在網(wǎng)絡上共享一個集中式的口令文件,從而大大簡化客戶端用戶對帳戶和口令的維護工作。yp-tools/ypbind,ypserv三個軟件包,用來安裝NIS服務器,安裝linux時可以選擇安裝
2.NIS在linux服務器上的安裝實施:
Server:Redhat AS 4u5
name:ypserv.king.com
IP:192.168.1.152
a.在ypserv.king.com 安裝 ypserv(YP server),yp-tools,ypbind.修改/etc/rc.local 在最后添加 nisdomainname ypserv( ypserv 是這個nis的域名)
b.修改/etc/sysconfig/network文件加入 NISDOMAIN=ypserv (本機申告nis域名).reboot機器,使nisdomain生效.
c.編輯/var/yp/Makefile文件,可以保持變,默認shadow支持開啟
d.啟動ypserv 服務:
server ypserv start YP服務的主程序
server yppasswdd start YP服務passwd 命令守護進程(可以才客戶段改變密碼)
e.生成YP數(shù)據(jù)庫
/usr/lib/yp/ypinit -m
At this point, we have to construct a list of the hosts which will run NIS
servers. ypserv.king.com is in the list of NIS server hosts. Please continue to add
the names for the other hosts, one per line. When you are done with the
list, type a .
next host to add: ypserv.king.com
next host to add:
注意一下在這里將要生成yp數(shù)據(jù)庫,在yp的makefile里定義的uid 號為 500 以后的用戶。所以說yp數(shù)據(jù)庫里的用戶必須是在server上添加完成的用戶,這樣才可以以后使用(也可以添加完成用戶后再次進行).
在生成過程中,可能出現(xiàn)2次的報錯 解決方法:touch /etc/aliases ,touch /etc/mail/aliases 可以解決
f.改變ypserv ,yppasswdd ,portmap 的啟動,chkconfig --level 345 ypserv on chkconfig --level 345 yppasswdd on chkconfig --level 345 portmap on
3.NIS在linux client的設置
Server:Redhat AS 4U5
name:ypclient.king.com
IP:192.168.1.153
a.在ypclient.king.com 安裝 ypserv(YP server),yp-tools,ypbind.修改/etc/rc.local 在最后添加 nisdomainname ypserv( ypserv 是這個nis的域名
b.修改/etc/hosts文件添加
192.168.1.152 ypserv.king.com
192.168.1.153 ypclient.king.com
c.啟動ypbind :server ypbind start ,server portmap start :chkconfig --level 345 ypbind on ,chkconfig --level 345 portmap on
d.連接ypserv:redhat 里面提供一個 authconfig 進行配置
authconfig 4.6.10 - (c) 1999-2005 Red Hat, Inc.
aaaaaaaaaaaaaaaaaaa Authentication Configuration aaaaaaaaaaaaaaaaaa
a User Information Authentication a
a [ ] Cache Information Use MD5 Passwords a
a [ ] Use Hesiod Use Shadow Passwords a
a [ ] Use LDAP [ ] Use LDAP Authentication a
a Use NIS [ ] Use Kerberos a
a [ ] Use Winbind [ ] Use SMB Authentication a
a [ ] Use Winbind Authentication a
a [ ] Local authorization is sufficient a
a a
a a Cancel a a Next a a
a aaaaaaaaaa aaaaaaaa a
a a
a a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
/ between elements | selects | next screen
e連接完成后就可以進行相關的測試了
本文來自ChinaUnix博客,如果查看原文請點:http://blog.chinaunix.net/u/21327/showart_383457.html |
|