1.创建用户、目录和安装包
yum install samba smbfs
useradd -s /sbin/nologin yunwei
smbpasswd -a yunwei
mkdir -p /date/yunwei
chmod 777 /data/yunwei
2.配置文件
cp /etc/samba/smb.conf /etc/samba/smb.confbak
vi /etc/samba/smb.conf
[homes]
comment = Home Directories
valid users = %S
browseable = No
writable = yes
create mode = 0664
directory mode = 0775
[yunwei]
comment = yunwei
path = /data/yunwei
public = no
valid users = @yunwei
write list = yunwei
printable = no
3.启动服务
Red Hat Enterprise Linux Server release 6.4 (Santiago)
/etc/init.d/smb start
service smb reload
linux 7
systemctl start smb
systemctl status smb
4.测试使用
windows => 运行 =>
\\ip\yunwei
参考:
http://www.ttlsa.com/linux/install-samba-on-linux/