第二道Samba题配置:
-
mkdir /smb1
-
chcon -R -t samba_share_t /smb2
-
setfacl -m u:ldapuser2:rwx /smb2
-
smbpasswd -a ldapuser2 (帐号不用创建)
-
vim /etc/samba/smb.conf
[smb2]
path = /smb2
valid users = ldapuser1 ldapuser2
write list = ldapuser2
6. systemctl restart smb nmb
7. vim /root/smb.passwd
username = ldapuser1
password = tianyun
8. vim /etc/fstab, 在desktop上
//server0/smb1 /mnt/smb1 cifs defaults, multiuser, sec=ntlmssp, credentials=/root/smb.passwd 0 0
9. su - ldapuser1
cifs add server0; cd /mnt/smb2; ls; /touch ttt
10. su - ldapuser2; cifscreds add server0
cd /mnt/smb2; ls; touch ttt
本文转自 拾瓦兴阁 51CTO博客,原文链接:http://blog.51cto.com/ponyjia/1866344