1)安装 sudo apt-get install samba
2)配置文件vi /etc/samba/smb.conf 添加如下
3)启动服务 sudo service smbd start
4)windows访问共享目录\192.168.91.130
设置用户 需要这样设置
5)将root用户添加到samba用户当中 smbpasswd -a root
6)修改samba配置文件 vi /etc/samba/smb.conf 文件,在末尾添加
[smbroot]
comment = share
browseable = yes
writable = yes
path = /home/karllen
valid users = root
7)重启 service smbd restart
[global]
workgroup = WORKGROUP
server string = Ted Samba Server %v
netbios name = TedSamba
security = user
map to guest = Bad User
passdb backend = tdbsam
[root]
comment = share some files
path = /
public = yes
writeable = yes
create mask = 0644
directory mask = 0755
[karllen]
comment = project development directory
path = /home/karllen
valid users = karllen
write list = karllen
public = yes
writeable = yes
printable = no
create mask = 0644
directory mask = 0755
setenforce 0 (PS:这里是关闭SELinux服务,如果要打开则setenforce 1)
vi /etc/sysconfig/selinux 把里边的一行改为 SELINUX=disabled
关闭防火墙