差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
nis [2017/01/05 21:14] 127.0.0.1 |
nis [2017/01/12 21:11] (目前版本) jz |
||
---|---|---|---|
行 13: | 行 13: | ||
</code> | </code> | ||
- | init master | + | start yp service |
<code> | <code> | ||
domainname csna | domainname csna | ||
- | ypinit -m | + | service ypserv start |
</code> | </code> | ||
- | make config | + | init master |
<code> | <code> | ||
cp /etc/master.passwd /var/yp/master.passwd | cp /etc/master.passwd /var/yp/master.passwd | ||
行 29: | 行 29: | ||
# comment out this line: NOPUSH = "True" | # comment out this line: NOPUSH = "True" | ||
make | make | ||
- | </code> | + | ypinit -m |
- | + | ||
- | start service | + | |
- | <code> | + | |
- | service ypserv start | + | |
- | service yppasswdd start | + | |
- | </code> | + | |
<code> | <code> | ||
Server Type: MASTER Domain: csna | Server Type: MASTER Domain: csna | ||
行 63: | 行 56: | ||
</code> | </code> | ||
+ | start yp password daemon | ||
+ | <code> | ||
+ | service yppasswdd start | ||
+ | </code> | ||
===== client ===== | ===== client ===== | ||
行 70: | 行 67: | ||
nisdomainname="csna" | nisdomainname="csna" | ||
nis_client_enable="YES" | nis_client_enable="YES" | ||
- | nis_client_flags="-S csna,csna1" | + | nis_client_flags="nis_yppasswdd_flags="-t /etc/master.passwd" -S csna,csna1" |
</code> | </code> | ||
行 76: | 行 73: | ||
domainname csna | domainname csna | ||
service ypbind start | service ypbind start | ||
+ | </code> | ||
+ | |||
+ | ==== allow nis account to login to client ==== | ||
+ | |||
+ | install mkhomedir pam | ||
+ | <code> | ||
+ | sudo pkg install pam_mkhomedir | ||
+ | </code> | ||
+ | |||
+ | add following to the session section of /etc/pam.d/system | ||
+ | <code> | ||
+ | session required /usr/local/lib/pam_mkhomedir.so | ||
+ | </code> | ||
+ | |||
+ | ==== allow nis account to login to client ==== | ||
+ | |||
+ | ''vipw'' and add following line | ||
+ | <code> | ||
+ | +:*:::::::: | ||
+ | </code> | ||
+ | |||
+ | ''vi /etc/group'' and add following line | ||
+ | <code> | ||
+ | +:*:: | ||
+ | </code> | ||
+ | |||
+ | or edit ''/etc/nsswitch.conf'' | ||
+ | remove | ||
+ | <code> | ||
+ | group: compat | ||
+ | group_compat: nis | ||
+ | passwd: compat | ||
+ | passwd_compat: nis | ||
+ | </code> | ||
+ | |||
+ | add | ||
+ | <code> | ||
+ | group: files nis | ||
+ | passwd: files nis | ||
</code> | </code> | ||
行 87: | 行 123: | ||
</code> | </code> | ||
+ | |||
+ | **ref** | ||
+ | |||
+ | [[http://mail.lsps.tp.edu.tw/~gsyan/freebsd2001/pam_ldap.html]] |