标签:
执行如下命令安装Samba服务:
opkg update opkg install samba36-server
配置文件路径为 /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
配置完成后,启动Samba服务即可。
/etc/init.d/samba start
设置开机启动:
/etc/init.d/samba enable
标签:
原文地址:http://www.cnblogs.com/souroot/p/4507733.html