码迷,mamicode.com
首页 > 其他好文 > 详细

rhel7 samba

时间:2015-10-11 19:45:45      阅读:219      评论:0      收藏:0      [点我收藏+]

标签: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

rhel7 samba

标签:samba

原文地址:http://4708948.blog.51cto.com/4698948/1701848

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!