安装
yum install samba samba-client samba-swat -y# samba-4.8.3-4.el7.x86_64
查看安装情况
rpm -qa|grep samba
修改配置文件
cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
vi /etc/samba/smb.conf
配置文件
[global]
workgroup = WORKGROUP
netbios name = centos
server string = hello
security = user
[share]
path = /home/share
writeable = yes
browseable = yes
admin users = file
create mask = 0777
directory mask = 0777
增加用户
smbpasswd -a file
增加目录
mkdir /home/share
id nobody
chown nobody:nobody /home/share
防火墙设置
firewall-cmd --permanent --add-port=137/tcp firewall-cmd --permanent --add-port=138/tcp firewall-cmd --permanent --add-port=139/tcp firewall-cmd --permanent --add-port=445/tcp firewall-cmd --permanent --add-port=901/tcp
firewall-cmd --reload
setenforce 0
vi /etc/selinux/config 修改 selinux=0
Samba服务器 启动 状态 关闭
service smb status/start/stop/restart
设置开机启动
chkconfig --level 35 smb on