*思路:创建Maojh用户和Dinghua用户,Maojh用户可以对文件夹浏览 Dinghua用户可以对文件夹浏览和修改
1.Linux下创建共享文件
(我的是在\home\samba\itshare)
2.在Linux下创建用户
useradd Maojh
useradd Dinghua
3.配置Linux用户的密码
smbpasswd -a Maojh
smbpasswd -a Dinghua
4.给用户权限(在Linux下允许他们访问共享的文件夹)
chmod 777 itshare
5.配置samba的配置文件
在/etc/samba/smb.conf
[itshare]-----------随便取的
comment = it share comment 对文件夹的描述
path = /home/samba/itshare 共享文件夹的路径
public = no 不允许公众访问
valid user = Maojh,Dinghua 有效用户
write list = Dinghua 可以写的用户
browse list = Maojh,Dinghua 可以浏览的用户
6.重启samba服务
systemctl restart smb.service