OpenWRT上配置samba4网络共享

2、luci页面上不需要配置任何共享目录,如果有删去

只在局域网使用的话,接口选择LAN口就行了

工作组和描述随意,自己喜欢填什么就填什么

启用macOS兼容共享建议勾选上

 

2、将下面的内容粘贴到编辑模板的模板文件中去

[global]
	netbios name = J9100
	interfaces = |INTERFACES|
	server string = |DESCRIPTION|
	unix charset = |CHARSET|
	workgroup = |WORKGROUP|
	bind interfaces only = no
	max connections = 0
	deadtime = 15
	enable core files = no
	security = user
	null passwords = yes
	passdb backend = smbpasswd
	socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
	aio read size = 0
	use sendfile = yes
	load printers = No
	printcap name = /dev/null
	disable spoolss = yes
	printing = bsd
	smb ports = 445 139
	veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/
	delete veto files = yes
	lanman auth = yes
	ntlm auth = ntlmv1-permitted

[storage]
	path = /mnt/hdd/storage
	force user = root
	force group = root
	create mask = 0777
	directory mask = 0777
	read only = yes
	write list = root
	guest ok = no
	inherit owner = yes

 

 

3、登录到OpenWRT后台,执行下列语句

smbpasswd -a root

根据提示输入密码

 

4、重启samba4服务

luci页面上依次点击系统->启动项,按 ctrl + f 搜索 samba 点击重启

 

本文参考恩山论坛liaohcai大佬:文章链接

THE END
分享
二维码
海报
OpenWRT上配置samba4网络共享
2、luci页面上不需要配置任何共享目录,如果有删去 只在局域网使用的话,接口选择LAN口就行了 工作组和描述随意,自己喜欢填什么就填什么 启用macOS兼容共享建……