At this point, we have to construct a list of the hosts which will run NIS servers. nmc is in the list of NIS server hosts. Please continue to add the names for the other hosts, one per line. When you are done with the list, type a . next host to add: nmc next host to add: woody next host to add: The current list of NIS servers looks like this:
nmc woody
Is this correct? [y/n: y] y We need some minutes to build the databases... Building /var/yp/linux.nchucc/ypservers... Running /var/yp/Makefile... gmake[1]: Entering directory `/var/yp/linux.nchucc' Updating passwd.byname... Updating passwd.byuid... Updating group.byname... .... Updating hosts.byname... Updating hosts.byaddr... Updating rpc.byname... Updating rpc.bynumber... Updating services.byname... Updating netid.byname... Updating protocols.bynumber... Updating protocols.byname... Updating mail.aliases... gmake[1]: Leaving directory `/var/yp/linux.nchucc'
Your Machine Server is Now an NIS Master
NIS Client Setup
edit /etc/yp.conf (if not there, create it !) /etc/yp/yp.conf指定你的NIS Server,如果此處未指定,NIS Client將會以Broadcast Domainname的方式自行尋找NIS Server,基本上讓NIS Client 自行尋找Server的做法是不安全的! /etc/yp.conf的格式如下: domaindomainname server nis_server 其中domain及server 是keyword,domainname是你所屬的NIS Domain名稱,nis_server是你所指定的NIS Server 。 一個例子: domain linux.nchucc server nmc.nchu.edu.tw
Setup Domainname For NIS Client 做法同Server
啟動NIS Client Daemon
Start By Hand: /etc/rc.d/init.d/ypbind start
Start AutoMatically When System BootUp cd e/tc/rc.d/rc3.d ln -s ../init.d/ypbind S60ypbind