centos7下samba简单配置

安装

1
yum install samba samba-client -y

防火墙添加例外

1
2
3
firewall-cmd --permanent --add-service=samba
firewall-cmd --permanent --add-service=samba-client
firewall-cmd --reload

备份Samba的配置文件:

1
cp  /etc/samba/smb.conf  /etc/samba/smb.conf.bak

配置Samba,最下面添加[hl]

1
2
3
4
5
vim /etc/samba/smb.conf   
[hl]
comment = hl
path = /home/hl
writable = yes

添加用户

1
smbpasswd  -a hl

启动samba

1
systemctl restart smb.service

添加评论