安装SMB
/opt/bin/opkg install samba36-server
打开SMB配置文件
vi /opt/etc/samba/smb.conf
编辑SMB配置文件
[global]
netbios name = XunLei
display charset = UTF-8
interfaces = 127.0.0.1/8 lo 192.168.0.123/24 br-lan
server string = XunLei Share
unix charset = UTF-8
workgroup = MSHOME
browseable = yes
deadtime = 30
domain master = yes
encrypt passwords = true
enable core files = no
# guest account = nobody
guest account = root
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 = /opt/etc/samba/smbpasswd
socket options = TCP_NODELAY IPTOS_LOWDELAY
syslog = 2
use sendfile = yes
writeable = yes
netbios name = XunLei
display charset = UTF-8
interfaces = 127.0.0.1/8 lo 192.168.0.123/24 br-lan
server string = XunLei Share
unix charset = UTF-8
workgroup = MSHOME
browseable = yes
deadtime = 30
domain master = yes
encrypt passwords = true
enable core files = no
# guest account = nobody
guest account = root
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 = /opt/etc/samba/smbpasswd
socket options = TCP_NODELAY IPTOS_LOWDELAY
syslog = 2
use sendfile = yes
writeable = yes
[homes]
comment = Home Directories
browsable = no
read only = no
create mode = 0750
[xl_USB]
path = /media/sda1
read only = no
guest ok = yes
interfaces = 127.0.0.1/8 lo 192.168.0.123/24 br-lan
[xl_TF]
path = /media/mmcblk0p1
read only = no
guest ok = yes
interfaces = 127.0.0.1/8 lo 192.168.0.123/24 br-lan
XunLei是在网上邻居里显示的名称,可以改成自己想要的
xl_USB和xl_TF是共享的磁盘名,同时共享USB和TF卡
/media/sda1为U盘的路径
/media/mmcblk0p1为TF卡的路径
按【Esc键】再输入【:wq!】回车,保存并退出~
-------------------------------------------------------------------------------
最后添加samba的root用户密码
/opt/sbin/smbpasswd -a root
输入你想设定的密码,不一定要和系统密码一样
/opt/etc/init.d/S08samba restart
执行上面一行命令,重启samba,然后在“网上邻居”里就可以看到赚钱宝挂载的U盘或TF卡了
目前有0条回应
Comment
Trackback