NIS实现用户登录+家目录服务器共享

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了NIS实现用户登录+家目录服务器共享相关的知识,希望对你有一定的参考价值。

本次的服务端是Proxy 客户端是Client

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


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

[[email protected]~]scp /etc/yp.conf /etc/nsswitch.conf 192.168.4.100:/etc/sysconfig/
[[email protected] ~]# yum -y install ypbind.x86_64
[[email protected] ~]# systemctl restart ypbind
[[email protected] ~]# ypcat passwd #####看服务端的用户
[[email protected] ~]# ssh [email protected] ###测试

以上是关于NIS实现用户登录+家目录服务器共享的主要内容,如果未能解决你的问题,请参考以下文章