利用NIS+AUTOFS+NIS实现集中管理网络计算机的用户账号信息,并能自动挂载其HOME目录,

项目需求:(1)因服务器群以及内网用户数量较多,管理不便,需要统一管理用户账号。密码
实现方案:在服务器群中增加一台nis服务器,设置两个域,其中内网用户为locallan,服务器群为dmz,拒绝外网的用户连接nis服务器。
解决方案:
(一)Setting up a NIS Server
(2)The NIS domain needs to be added in the /etc/sysconfig/network file. Edit the file and add the following line to the end of the file:
Replace DOMAIN-NAME with the actual domain name of the server.
(3)The NIS Server also needs to be set up as a client. Edit the /etc/yp.conf file and add the following line:
(4)Start the following daemons: portmap, yppasswdd, and ypserv.
This lets the user to specify the NIS domain and the NIS Server. Enter the domain name as the one which is used previously and localhost as the NIS server.
(7)The services ypbind and ypxfrd can be started by executing the command:
The above steps complete the steps to configuring a master NIS Server.
(8)vim /etc/ypserv.conf
# Host
#
# *
# *
(9)vim /etc/nsswitch.conf
passwd:
shadow:
group:
hosts:
(二)Setting up a NIS Client
The following packages are required for setting up a client
- yp-tools
Execute the command:
This will let you specify the NIS domain and the NIS Server.
Start the ypbind services by executing the following commands:
The above procedure is a simple example of setting up an NIS Server and Client
(三)setup nfs
(1) yum -y install nfs-utils
(2)add users
useradd -d /rhome/RedHat2001 redhat2001
useradd -d /rhome/RedHat2002 redhat2002
(3) vim /etc/exports
/rhome
(4)service nfs restart
(四)on_the_client----(4)vim /etc/auto.master
/rhome
on_the_client----(5) vim /etc/auto.nis
*
on_the_client----(6)mkdir /rhome
on_the_client--(7)service autofs restart

LPIC 3考试范围,到底
誉天2010年9月思科红
红帽RedHat国际认证
红帽Linux认证与LPI的
RHCE专题学习之PPTP配
RHCE专题学习之nis+nf
RHCE学习:TFTP+DHCP+
RHCE心得之Iptables学