作者:liyanyl_499 | 来源:互联网 | 2023-06-08 10:37
Openwrt版本为OpenWrtChaosCalmer15.05安装程序包opkgupdateopkginstall samba36-serveropkginstall luci
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