Luci samba interface

i use some little box ( WT3020 , GL-Inet MT300 , KIMAX U25... ) and i cannot share hdd in relay mode

I have a little problem with Luci parameters :because i have not found interface line for programming in samba

solved ( SSH ) after add manualy a line in etc/config/samba as:

config samba
option workgroup 'WORKGROUP'
option interface 'br-lan,eth0,wlan0'
option homes '1'
option name 'MINIHERE-238'
option description 'MINIHERE-238'

config sambashare
option browseable 'yes'
option path '/mnt/sda1'
option read_only 'no'
option guest_ok 'yes'
option name 'USB'

Why i cannot with LUCI ?


I was struggling with this very same problem . It appears that when you add additional interfaces, such as VLANs, the /etc/init.d/samba exe only sees the loopback and the lan interfaces, and creates all the subsequent smb.conf files that are used by LuCI (/var/etc/smb.conf creates the /etc/samba/smb.conf.template which writes to the /etc/samba/smb.conf). Subsequently, the interfaces = |INTERFACES| line in the smb.conf.template will only be listening on the lo and br-lan interfaces.

(You can check this yourself with the command)
netstat -tapn | grep smbd

I finally figured that if you alter the interface line in the /etc/init.d/samba file with the following:

smb_header() {
config_get samba_iface $1 interface "loopback lan"

smb_header() {
config_get samba_iface $1 interface "loopback lan [name-of-your-interface]"

Save the file with the same name (/etc/init.d/samba), and I always copy my original file into a back-up to avoid f-ups.
Restart samba via LuCI, and you will see both your original samba and the copy of the old samba, which should be disabled.

This way when you restart your device, the LuCI will not overwrite your workaround.
Hope this helps.