标签:samba
服务器:
yum -y install samba*
firewall-cmd --per --add-port=137/tcp
firewall-cmd --per --add-port=138/tcp
firewall-cmd --per --add-port=139/tcp
firewall-cmd --per --add-port=445/tcp
firewall-cmd --rel
vim /etc/samba/smb.conf
[hrr]
path = /hrr
browseable = yes
write list = hrr
useradd hr
useradd hrr
pdbedit -a -u hr
密码:redhat
pdbedit -a -u hrr
密码:redhat
mkdir /hrr
chmod 777 /hrr
chcon -R -t samba_share_t /hrr
systemctl enable smb nmb
systemctl start smb nmb
客户机:
yum -y install samba*
yum -y install cifs*
mkdir /mnt/hrr
vim /etc/smbuser
username=hrr
password=redhat
vim /etc/fstab
//server0/hrr /mnt/hrr cifs defaults,multiuser,credentials=/etc/smbuser,sec=ntlmssp 0 0
mount -a
cd /mnt/hrr
ls #成功
touch abc #不成功
cifscreds add server0 -u hrr
touch abc #成功
本文出自 “Yolo” 博客,请务必保留此出处http://4708948.blog.51cto.com/4698948/1701848
标签:samba
原文地址:http://4708948.blog.51cto.com/4698948/1701848