1.yum -y install samba 2.cd /etc/samba 3.ls 4.vim smb.conf 5.修改配置文件中的workgroup=STAFF 6.mkdir /common 7.vim smb.conf 8.在配置文件的最后加入这些内容 【common】 path=/common hosts allow=192.168.122.0/24 最后,保存退出 9.你共享某个目录,必须得把共享目录的上下文改一下, **chcon -R -t samba_share_t /common/ ** 10.查看andy用户存在不,不存在新建一个 id andy useradd andy 11.andy必须是Samba用户,pdbedit -L 没有这个命令,需要安装,如下 12.yum whatprovides */smbpasswd yum -y install samba-client smbpasswd -a andy 输入密码:redhat 13.firewall-cmd --add-service=samba firewall-cmd --add-service=samba --permanent