FYI: You can set '*' for the interfaces value, that way it will work for BOTH ethernet and wlan.
I also created a
/shared directory and an
smb user to manage all the samba files. This is what I have now:
root@Omega-72FF:~# cat /etc/config/samba
option 'name' 'Omega'
option 'workgroup' 'WORKGROUP'
option 'description' 'Omega'
option 'homes' '0'
option 'interface' '*' # <-- (wlan + ethernet)
option 'name' 'shared'
option 'path' '/shared'
option 'users' 'smb'
option 'guest_ok' 'yes'
option 'create_mask' '0700'
option 'dir_mask' '0700'
option 'read_only' 'no'
Note that the
smb user has to be created both as a system user AND samba user. This is done by editing the
/etc/passwd file (add a line), setting the password for the newly created use (
passwd smb) and creating the user at samba level with
smbpasswd -a smb. Make sure you also do
chown smb /shared so that this user owns the relevant directory.
As per @Luciano-S coment above, the reason for going through all this malarchy is because the
root user by default is prevented from being a samba user as well (I'm guessing because of the security risk).
You can probably turn this off by commenting the relevant line in
/etc/samba/smb.conf.template then setting
root as your sambashare user instead.. but I was happier with the config above:
netbios name = |NAME|
display charset = |CHARSET|
interfaces = |INTERFACES|
server string = |DESCRIPTION|
unix charset = |CHARSET|
workgroup = |WORKGROUP|
local master = no
browseable = yes
deadtime = 30
domain master = yes
encrypt passwords = yes
enable core files = no
guest ok = yes
# invalid users = root # hmmm.. is commenting this out a good idea?
load printers = no
map to guest = Bad User
max protocol = SMB2