差異處
這裏顯示兩個版本的差異處。
| 兩邊的前次修訂版 前次修改 下次修改 | 前次修改 | ||
| nis [2017/01/04 21:40] – 127.0.0.1 | nis [2017/01/12 21:11] (目前版本) – jz | ||
|---|---|---|---|
| 行 7: | 行 7: | ||
| < | < | ||
| nisdomainname=" | nisdomainname=" | ||
| - | nis_server_enable=" | + | nis_server_enable=" |
| nis_yppasswdd_enable=" | nis_yppasswdd_enable=" | ||
| nis_client_enable=" | nis_client_enable=" | ||
| - | nis_client_flags=" | + | nis_client_flags=" |
| </ | </ | ||
| - | start service | + | start yp service |
| < | < | ||
| + | domainname csna | ||
| service ypserv start | service ypserv start | ||
| </ | </ | ||
| - | make config | + | init master |
| < | < | ||
| cp / | cp / | ||
| + | cp /etc/group / | ||
| cd /var/yp | cd /var/yp | ||
| - | vi master.passwd | + | vi master.passwd |
| + | vi group # delete admin group | ||
| vi Makefile | vi Makefile | ||
| # comment out this line: NOPUSH = " | # comment out this line: NOPUSH = " | ||
| - | </ | + | make |
| - | + | ypinit -m | |
| - | init master | + | |
| < | < | ||
| - | freebsd@csna:/ | ||
| Server Type: MASTER Domain: csna | Server Type: MASTER Domain: csna | ||
| 行 47: | 行 48: | ||
| done with the list, type a <control D>. | done with the list, type a <control D>. | ||
| master server | master server | ||
| - | next host to add: csna-slave1 | ||
| next host to add: ^D | next host to add: ^D | ||
| The current list of NIS servers looks like this: | The current list of NIS servers looks like this: | ||
| csna | csna | ||
| - | csna-slave1 | ||
| Is this correct? | Is this correct? | ||
| </ | </ | ||
| + | start yp password daemon | ||
| + | < | ||
| + | service yppasswdd start | ||
| + | </ | ||
| ===== client ===== | ===== client ===== | ||
| - | ypinit | + | add to rc.conf |
| + | |||
| + | < | ||
| + | nisdomainname=" | ||
| + | nis_client_enable=" | ||
| + | nis_client_flags=" | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | domainname csna | ||
| + | service ypbind start | ||
| + | </ | ||
| + | |||
| + | ==== allow nis account to login to client ==== | ||
| + | |||
| + | install mkhomedir pam | ||
| + | < | ||
| + | sudo pkg install pam_mkhomedir | ||
| + | </ | ||
| + | |||
| + | add following to the session section of / | ||
| + | < | ||
| + | session | ||
| + | </ | ||
| + | |||
| + | ==== allow nis account to login to client ==== | ||
| + | |||
| + | '' | ||
| + | < | ||
| + | +: | ||
| + | </ | ||
| + | |||
| + | '' | ||
| + | < | ||
| + | +:*:: | ||
| + | </ | ||
| + | |||
| + | or edit ''/ | ||
| + | remove | ||
| + | < | ||
| + | group: compat | ||
| + | group_compat: | ||
| + | passwd: compat | ||
| + | passwd_compat: | ||
| + | </ | ||
| + | |||
| + | add | ||
| + | < | ||
| + | group: files nis | ||
| + | passwd: files nis | ||
| + | </ | ||
| + | |||
| + | ===== debug ===== | ||
| + | < | ||
| + | rpcinfo -p serverhost | ||
| + | ypwhich | ||
| + | ypcat -x | ||
| + | ypcat passwd | ||
| + | ps aux | grep yp # must have only one process for ypbind | ||
| + | </ | ||
| - | nis_yppasswdd_flags=" | + | **ref** |
| - | rpcbind_enable=" | + | |
| + | [[http:// | ||