码迷,mamicode.com
首页 > 其他好文 > 详细

openwrt设置samba

时间:2015-05-16 14:49:10      阅读:345      评论:0      收藏:0      [点我收藏+]

标签:

1. 安装Samba服务

执行如下命令安装Samba服务:

opkg update
opkg install samba36-server


2. 配置全局共享参数

配置文件路径为 /etc/samba/smb.conf.template ,将 [global] 中的 invalid users = root 注掉,像下面的样子:[global]

netbios name = |NAME|
display charset = |CHARSET|
interfaces = |INTERFACES|
server string = |DESCRIPTION|
unix charset = |CHARSET|
workgroup = |WORKGROUP|
browseable = yes
deadtime = 30
domain master = yes
encrypt passwords = true
enable core files = no
guest account = nobody
guest ok = yes
# invalid users = root
local master = yes
load printers = no
map to guest = Bad User
max protocol = SMB2
min receivefile size = 16384
null passwords = yes
obey pam restrictions = yes
os level = 20
passdb backend = smbpasswd
preferred master = yes
printable = no
security = user
smb encrypt = disabled
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY IPTOS_LOWDELAY
syslog = 2
use sendfile = yes
writeable = yes


3.设置/etc/config/samba

设置:
                
config sambashare
        option ‘name‘                        ‘tmp‘
        option ‘path‘                        ‘/tmp‘
        option ‘read_only‘                ‘no‘
        option ‘guest_ok‘                ‘no‘
        option ‘create_mask‘        ‘0700‘
        option ‘dir_mask‘                ‘0700‘
        option ‘users‘                        ‘root‘

4. 设置root用户密码:

Samba的共享用户密码是单独配置的,执行下面的命令将root添加为共享用户,同时按照命令提示设置共享密码。

smbpasswd -a root

5. 完成

配置完成后,启动Samba服务即可。

/etc/init.d/samba start

设置开机启动:
/etc/init.d/samba enable
 

openwrt设置samba

标签:

原文地址:http://www.cnblogs.com/souroot/p/4507733.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!