NIS (Network Information Service) ================================= (1) NIS Master server ascii files aliases bootparams ethers group hosts networks passwd protocols services (2) NIS client mapname.dir mapname.pag (3) ypbind and ypserv - NIS client starts NIS binding daemon(/usr/etc/ypbind). - ypbind broadcasts to search NIS server. - NIS server starts NIS server daemon(/usr/etc/ypserv). - ypbind looks for other server if there's no response. (4) yppasswd and yppasswdd - yppasswd . /usr/etc/rpc.yppasswdd is NIS passwd daemon. (5) NIS afftected files - /etc/passwd ------------------ - +::0:0::: ------------------ All NIS password database entries is valid at this host. ------------------ - +joe: ------------------ - /etc/group - /etc/aliases - /etc/bootparams - /etc/hosts (6) Initializing a NIS Master Server - domain name --------------------- # domainname universe --------------------- - /etc/defaultdomain Add domain name - /etc/rc.local file Add /usr/etc/rpc.yppasswdd ypxfrd startup line - database ------------------------------------------- # mkdir /va/yp # cp /usr/lib/NIS.Makefile /var/yp # cd /usr/etc/yp # ypinit -m quit on non-fatal errors[y/n] n next host to add: galaxy /* mastername next host to add: pluto /* slavename next host to add: ^D ------------------------------------------- (7) Initializing a NIS Slave Server - Select domainname --------------------- # domainname universe --------------------- - /etc/defaultdomain Add domainname - /etc/rc.local Remove # symbol ypbind - /var/yp directory - ypbind ------------------ # /usr/etc/ypbind ------------------ - master database ----------------------------------- # cd /usr/etc/yp # ypinit -s galaxy /* mastername quit on non-fatal errors[y/n] n ----------------------------------- - NIS server daemon Start or reboot ------------------ # fastboot ------------------ (8) Initializing a NIS Client - modify domainname --------------------- # domainname universe --------------------- - /etc/defaultdomain add domain name - /etc/rc.local ypbind - /var/yp directory - NIS binding daemon ----------------------- # fastboot ----------------------- (9) Updating the NIS Database ---------------------------------------- master# vipw edit and update the file master# cd /var/yp master# make ---------------------------------------- (10) Information NIS Commands - ypwhich (Which is your NIS server) - ypwhich -m (which is your master server) - ypwhich clientname - yppush (copy master map from NIS master server to slave server) - ypset host (bind specific NIS server) - ypcat map (view specific NIS map file) - ypmatch key0 key1 map (key value for NIS map) ---------------------------------------------------------