這是本文件的舊版!
NIS
server
rc.conf
nisdomainname="csna" nis_server_enable="YES" nis_yppasswdd_enable="YES" nis_client_enable="YES" nis_client_flags="-S NIS domain,server"
service ypserv start
cp /etc/master.passwd /var/yp/master.passwd cd /var/yp vi master.passwd vi Makefile comment out NOPUSH = “True”
freebsd@csna:/var/yp % sudo ypinit -m csna Server Type: MASTER Domain: csna Creating an YP server will require that you answer a few questions. Questions will all be asked at the beginning of the procedure. Do you want this procedure to quit on non-fatal errors? [y/n: n] n Ok, please remember to go back and redo manually whatever fails. If you don't, something might not work. Can we destroy the existing /var/yp/csna and its contents? [y/n: n] OK, please clean it up by hand and start again. Bye freebsd@csna:/var/yp % sudo ypinit -m csna Server Type: MASTER Domain: csna Creating an YP server will require that you answer a few questions. Questions will all be asked at the beginning of the procedure. Do you want this procedure to quit on non-fatal errors? [y/n: n] n Ok, please remember to go back and redo manually whatever fails. If you don't, something might not work. Can we destroy the existing /var/yp/csna and its contents? [y/n: n] y At this point, we have to construct a list of this domains YP servers. csna is already known as master server. Please continue to add any slave servers, one per line. When you are done with the list, type a <control D>. master server : csna next host to add: csna-slave1 next host to add: ^D The current list of NIS servers looks like this: csna csna-slave1 Is this correct? [y/n: y] y
client
ypinit -s nisserver nisdomain
nis_yppasswdd_flags=“-t /var/yp/master.passwd” 指定 NIS 密碼檔路徑 rpcbind_enable=“YES” 4.x 為啟動 portmap