2005年6月20日 星期一

NIS Server (YP Server)

domain:nis.math.ncu.edu.tw (yp master)
IP:140.115.25.2

1.install nis server
# apt-get install nis portmap

2.setting

# vi /var/yp/Makefile
GROUP = /var/yp/math/group
PASSWD = /var/yp/math/passwd
SHADOW = /var/yp/math/shadow
GSHADOW = /var/yp/math/gshadow
(see ubuntu:/var/yp/Makefile)

# vi /etc/default/portmap
uncomment ARGS=""-i 127.0.0.1""

# vi /etc/default/domain
mathnis

# vi /etc/default/nis
NISSERVER=master

# vi /etc/yp.conf
domain mathnis server 140.115.25.2

# vi /etc/ypserv.conf
140.115.25.4:*:none:no
140.115.25.15:*:none:no
140.115.25.9:*:none:no
127.0.0.1:*:none:no
xfr_check_port: no

# vi /etc/ypserv.sercurenets
255.255.255.0 140.115.25.0
255.255.255.0 140.115.26.0

# vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
140.115.25.2 nis.math.ncu.edu.tw nis

# vi /etc/host.conf
order hosts,bind,nis
multi on

# vi /etc/nsswitch.conf
passwd: compat
group: compat
shadow: compat
hosts: files dns nis
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis

# cat >> /etc/passwd
+::::::

# cat >> /etc/shadow
+::::::::

3.Restart service
# /etc/init.d/portmap restart
# /etc/init.d/nis restart


Reference:
http://lyre.mit.edu/~powell/debian-howto/nis.html#3

Note:
Actually, MCL does'n use NIS Server now.

沒有留言: