The Network Information Service (NIS)-based authentication is useful in NFS-only environment where NIS acts as an ID-mapping server and also used for netgroups. When the file access is configured with NIS, you cannot enable SMB access.
环境准备
硬件配置
部件名称 | 内容 |
---|---|
FP5280G2 物理机Host | 2颗Power9 CPU 22c*2; 内存256GB; 磁盘2块480GB SSD,6个900GB SAS盘; 双口千兆网卡。 |
软件配置
部件名称 | 内容 |
---|---|
OS | Centos7.6 PPC64le |
安装步骤
yum -y install ypbind yp-tools
cat /etc/hosts #加入nis server
echo "NISDOMAIN=nismaster" >> /etc/sysconfig/network
echo "ypserver BD1" >> /etc/yp.conf
在/etc/nsswitch.conf中添加下面内容
passwd: compat systemd nis
group: compat systemd nis
shadow: compat nis
gshadow: files
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname nis
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
systemctl restart rpcbind
systemctl restart ypbind
测试
ypwhich
[root@xxx1 data]# ypwhich -x
Use "ethers" for map "ethers.byname"
Use "aliases" for map "mail.aliases"
Use "services" for map "services.byname"
Use "protocols" for map "protocols.bynumber"
Use "hosts" for map "hosts.byname"
Use "networks" for map "networks.byaddr"
Use "group" for map "group.byname"
Use "passwd" for map "passwd.byname"
ypcat passwd
ypcat hosts
yptest
添加客户后,要生效同步
cd /var/yp
make
参考链接
安装nis