前言
在linux环境下,若要实现一个用户在多台主机上登录,需要怎么操作呢。
使用ldap?不,这过于复杂了,要实现轻量的用户验证环境,只需要配置nis+nfs即可。
nis服务可以集中式管理账户(用户、组、hosts、等等。。),配置过程相对简单。
环境
-
Server
- ip: 172.16.70.129
- 安装软件: ypserv(nis服务), nfs-utils(nfs服务)
-
Client
- ip: 172.16.70.130
- 安装软件: ypbind(nis客户端), nfs-utils-lib(nfs挂载支持), setuptool(自动配置工具)
nis服务端配置
配置允许访问的网段。
1 2 3 4 5 6 7 8 9 10 11 |
[root@localhost ~]# vi /etc/ypserv.conf 41 # If you comment out the next rule, ypserv and rpc.ypxfrd will 42 # look for YP_SECURE and YP_AUTHDES in the maps. This will make 43 # the security check a little bit slower, but you only have to 44 # |