Openwrt安装samba服务

Openwrt版本为OpenWrt Chaos Calmer 15.05


安装程序包


opkg update

opkg install samba36-server

opkg install luci-app-samba

opkg install luci-i18n-samba-zh-cn


修改/etc/config/samba 文件,添加共享文件夹的访问权限:

添加下面的内容

config ‘sambashare’
  option ‘read_only’ ‘no’        
  option ‘create_mask’ ’0700′
  option ‘dir_mask’ ’0700	#权限
  option ‘guest_ok’ ‘yes’
  option ‘path’ ‘
/root #共享文件路径   option ‘name’ ‘root’


给Samba创建用户访问:

root@OpenWrt:~# smbpasswd -a root
New SMB password:
Retype SMB password:


重启samba

root@OpenWrt:/etc# /etc/init.d/samba restart

完成



参考:

https://wiki.openwrt.org/doc/howto/cifs.server

http://www.cnblogs.com/double-win/p/3848797.html

猜你喜欢

转载自blog.csdn.net/kingwan560/article/details/52209185