现在的位置: 首页 > 操作系统 > 正文

ubuntu下开启samba服务

2019年09月02日 操作系统 ⁄ 共 617字 ⁄ 字号 评论关闭

首先,创建一个目录

mkdir /home/leafroot/share

chmod 777 /home/leafroot/share

编辑

/etc/samba/smb.conf

去掉 security = user前的;

加上 username map = /etc/samba/smbuser

在文件的最后,加上

[Share]

comment = comment

path = /home/leafroot/share

public = yes

writable = yes

valid users = wanghn

create mask = 0700

directory mask = 0700

force user = nobody

force group = nogroup

available = yes

browseable = yes

并且,找到[global],修改或加上

workgroup = WORKGROUP

display charset = UTF-8

unix charset = UTF-8

dos charset = cp936

存盘退出

增加用户 sudo useradd wanghn

修改密码 sudo smbpasswd -a wanghn

然后,编辑? /etc/samba/smbuser

加入 wanghn = “network username”

确认选项生效,并重启服务

sudo testparm

sudo /etc/init.d/samba restart

原文:http://www.codesky.net/article/200709/176598.html

【上篇】
【下篇】

抱歉!评论已关闭.