【RHCE】第8题:通过SMB共享目录

技术

红帽认证7.0【RHCE】第8题:通过SMB共享目录
【题目】
在system1上配置SMB服务,要求:

  • 您的SMB服务器必须是STAFF工作组的一个成员
  • 共享/common目录,共享名称必须为common
  • 只有group8.example.com域内的客户端可以访问common共享
  • common必须是可以浏览的
  • 用户andy必须能够读取共享中的内容,如果需要的话,验证密码是redhat

【答案】
yum install samba samba-client
systemctl enable smb nmb
systemctl start smb nmb

firewall-cmd –permanent –add-service=samba
firewall-cmd –reload
firewall-cmd –list-all

mkdir /common
semanage fcontext -a -t samba_share_t “/common(/.*)?”
restorecon -v /common
ls -Zd /common

smbpasswd -a andy
pdbedit -L

vi /etc/samba/smb.conf
workgroup = STAFF
[common]
path = /common
hosts allow = 172.24.8.0/24

systemctl restart smb nmb

smbclient -L //172.24.8.11

smbclient //172.24.8.11/common -U andy

发表回复