脚本宝典收集整理的这篇文章主要介绍了Centos7中配置NIS:用户账号管理,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。NIS:网络信息服务 linux系统中用户按地域分两类:本地用户,远程用户(NIS、LDAP、AD)模式:C/S模式ypbind是定义NIS服务器的客户端进程,一旦确定了服务器位置,客户端绑定到了服务器上,所有客户的查询都发往NIS服务器。ypserv是回答客户端查询的服务器进程。 一、安装NIS服务器(Server端192.168.2.21)设置主机名
Systemctl stop firewalld systemctl disable firewalld.service
yum install ypserv ypbind nfs-utils rpcbind
vim /etc/sysconfig/network 添加一行NISDOMAIN=testserver.com
vim /etc/rc.d/rc.local 添加一行/bin/nisdomainname testserver.com
192.168.2.21 david 192.168.2.25 client
* : * : * : none
127.0.0.0/255.255.255.0 : * : * : none 192.168.2.0/255.255.255.0 : * : * : none * : * : * : deny
systemctl start rpcbind (service rpcbind start) systemctl start yppasswdd systemctl start ypserv
mkdir /home/nis_users useradd -d /home/nis_users/user1 user1
/usr/lib64/yp/ypinIT -m
getent passwd
vim /etc/selinux/config
/home/nis_users 192.168.2.0/24(rw,sync)
systemctl restart nfs systemctl enable nfs
hostnamectl set-hostname client
yum install authconfig* sSSD* krb5* autofs ypbind //yum install -y ypbind yp-tools
nisdomainname testserver.com
vim /etc/sysconfig/network 添加一行NISDOMAIN=testserver.com
vim /etc/rc.d/rc.local 添加一行/bin/nisdomainname testserver.com
192.168.2.21 david 192.168.2.25 client
getent passwd
systemctl start rpcbind systemctl start ypbind systemctl enable ypbind
/home/nis_users /etc/auto.nis
vim /etc/auto.nis
* 192.168.2.21:/home/nis_users/&
systemctl restart autofs systemctl enable autofs
su - user1 pwd
三、排错、挂载文件若出现下图,则说明文件系统没有挂载上。
mount -t nfs 192.168.2.21:/home/nis_users /home/nis_users/
vim /etc/sysconfig/authconfig
@H_360_242@
iii、vim /etc/nsswitch.conf
以上是脚本宝典为你收集整理的Centos7中配置NIS:用户账号管理全部内容,希望文章能够帮你解决Centos7中配置NIS:用户账号管理所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。