NIS

======NIS server========

root> yum install ypserv

=> 1-4-3 將CentOS6的更新指定為國內大學ftp站

=>CentOS 6 安裝設定手札

yum 發生 [Errno 14] PYCURL ERROR 6 的問題
因為 bind 還沒有運作無法解析,所以在 /etc/hosts 增加 hostname 對應
140.127.177.17 ftp.isu.edu.tw

root>vim /etc/sysconfig/network

NISDOMAIN=vbirdnis

YPSERV_ARGS="-p 1011"

root> vim /etc/ypserv.conf

dns:no

files:30

xfr_check_port:yes

127.0.0.0/255.255.255.0                :    *    :    *    :    none

192.168.100.0/255.255.255.0        :    *    :    *    :    none

*                                                      :    *    :    *    :     deny

*                                                        :    *    :     *    : none

root> vim /etc/hosts

192.168.100.254    www.centos.vbird

192.168.100.10 clientlinux.centos.vbird

root> hostname

=============

root> vim /etc/sysconfig/yppasswdd

YPPASSWDD_ARGS="--port 1012"

==================

[root@www ~]# 
vi /etc/sysconfig/authconfig
USENIS=
yes

=====================

 

root> /etc/init.d/ypserv start

root>/etc/init.d/yppasswdd start

root> chkconfig ypserv on

root> chkconfig yppasswdd on

root> rpcinfo -p localhost

root>rpcinfo -u localhost ypserv

root>useradd -u 1001 nisuser1

root>useradd -u 1002 nisuser2

root>useradd -u 1003 nisuser3

root>echo password | passwd --stdin nisuser1

root>echo password | passwd --stdin nisuser2

root>echo password | passwd --stdin nisuser3

root>/usr/lib64/yp/ypinit -m

root> touch /etc/alias

root> /usr/lib64/yp/ypinit -m

root> iptables -A INPUT -i eth? -p tcp -s 192.168.100.0/24 --dport 1011 -j ACCEPT

root> iptables -A INPUT -i eth? -p udp -s 192.168.100.0/24 -m multiport --dport 1011,1012 -j ACCEPT

====== 或先關掉防火牆=========

=>root> iptables -F

=>root>iptables -X

=>root> iptables -Z

====clientlinux======

clientlinux>setup

clientlinux>cat /etc/sysconfig/network

NISDOMAIN=vbirdnis

clientlinux>cat /etc/yp.conf

domain vbirdnis server    192.168.100.254

clientlinux> vim /etc/nsswitch.conf

clientlinux> yptest

clientlinux> ypwhich -x

=> Debug=> https://bugzilla.redhat.com/show_bug.cgi?id=781880

clientlinux> ypcat passwd.byname

=======================

root>mkdir /rhome

root>useradd -u 2001 -d /rhome/cluster1 cluster1

root>useradd -u 2002 -d /rhome/cluster2 cluster2

root>useradd -u 2003 -d /rhome/cluster3 cluster3

root>echo password | passwd --stdin cluster1

root>echo password | passwd --stdin cluster2

root>echo password | passwd --stdin cluster3

root>vim  /etc/sysconfig/network

NISDOMAIN=vbirdcluster