Windows下映射Ubuntu私人目录
作者:互联网
1.安装Samba服务组件
apt-get install samba samba-common
2.创建目录并加777权限
mkdir /home/ethan
chmod 777 /home/driver
3.新建私有用户并设置密码,以driver为例
adduser driver
4.为用户添加root权限,/etc/sudoers 增加写权限,使用完后取消写权限
chmod +w /etc/sudoers
vim /etc/sudoers
chmod -w /etc/sudoers
在root后添加
root ALL=(ALL:ALL) ALL
drivver ALL=(ALL:ALL) ALL
5.把私有用户添加到samba并设置密码
smbpasswd -a driver
6.修改samba配置文件,在文件末尾添加如下信息
sudo vim /etc/samba/smb.conf
[driver]
comment = share folder
browseable = yes
path = /home/driver
create mask = 0777
directory mask = 0777
valid users = driver
force user = driver
force group = driver
public = yes
available = yes
writable = yes
7.重启Samba服务
service smbd restart
8.Windows添加网络映射
标签:samba,映射,Windows,sudoers,driver,etc,添加,Ubuntu,yes 来源: https://www.cnblogs.com/kqxs/p/16373250.html