NIS實現用戶登錄+家目錄服務器集羣共享

本次的服務端是Proxy 客戶端是Client

[root@proxy ~]# yum -y install ypserv ypbind
[root@proxy ~]# vim /etc/sysconfig/network
NISDOMAIN=hpc
[root@proxy ~]# systemctl restart ypserv
[root@proxy ~]# systemctl restart yppasswdd
[root@proxy ~]# cd /var/yp /
[root@proxy yp]# make


[root@proxy ~]# vim /etc/yp.conf
domain hpc server 192.168.4.5 ###### 服務端地址
[root@proxy ~]# vim /etc/nsswitch.conf +33 ##### 直接到配置文件的第33行
passwd: files nis sss
shadow: files nis sss
group: files nis sss
[root@proxy ~]# systemctl restart ypbind

[root@proxy~]scp /etc/yp.conf /etc/nsswitch.conf 192.168.4.100:/etc/sysconfig/
[root@client ~]# yum -y install ypbind.x86_64
[root@client ~]# systemctl restart ypbind
[root@client ~]# ypcat passwd #####看服務端的用戶
[root@client ~]# ssh [email protected] ###測試

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章