Samba 简单安装配置

时间:2021-01-08 04:38:27

一、安装

yum -y install samba


二、启动

service smb start
chkconfig smb on


三、配置

vim /etc/selinux/config

SELINUX=enforcing
=>
SELINUX=disabled


vim /etc/samba/smb.conf

security = user
=>
security = share

[sharedir]
comment = Sharedir
path = /data/sharedir
browseable = yes
guest ok = no
writeable = yes
valid users = myuser


添加smaba用户并设置密码
smbpasswd -a myuser

(注:myuser为系统已存在用户)

chown -R myuser /data/sharedir
chmod 700 /data/sharedir


reboot.