Pulling my hair out here.
I configured a simple network share to test this. Here is the config (though I did it with LuCI):
# cat /etc/samba/smb.conf
[global]
netbios name = Cerberus
display charset = UTF-8
interfaces = 127.0.0.1/8 lo 192.168.0.1/24 br-lan
server string = Guardian of the gateway
unix charset = UTF-8
workgroup = WORKGROUP
browseable = yes
deadtime = 30
domain master = yes
encrypt passwords = true
enable core files = no
guest account = nobody
guest ok = yes
invalid users = root
local master = yes
load printers = no
map to guest = Bad User
max protocol = SMB2
min receivefile size = 16384
null passwords = yes
obey pam restrictions = yes
os level = 20
passdb backend = smbpasswd
preferred master = yes
printable = no
security = user
smb encrypt = disabled
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY IPTOS_LOWDELAY
syslog = 2
use sendfile = yes
writeable = yes
[homes]
comment = Home Directories
browsable = no
read only = no
create mode = 0750
[root]
path = /
valid users = root
read only = no
guest ok = no
create mask = 0664
directory mask = 0775
Yes, it’s not the best plan to expose a share of the root file system but I’m not looking for a security lesson I’m trying to achieve a result and will pare it down to what I think works best for me once the proof of concept is in place. Alas I can’t get that far.
From my desktop system (Linux MINT) I see this:
$ smbclient -L Cerberus
WARNING: The "syslog" option is deprecated
Enter bernd's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.25]
Sharename Type Comment
--------- ---- -------
root Disk
IPC$ IPC IPC Service (Guardian of the gateway) Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.25]
Server Comment
--------- -------
CERBERUS Guardian of the gateway
Workgroup Master
--------- -------
WORKGROUP CERBERUS
Looks fine to me. But then:
$ ls -ld /media/Cerberus/
drwxr-xr-x 2 root root 4096 May 6 18:16 /media/Cerberus/
$ cat $HOME/bin/cerberus.auth
username = root
password = ******
domain = WORKGROUP
$ sudo mount -vt cifs //Cerberus/root -ocredentials=$HOME/bin/cerberus.auth /media/Cerberus
domain= WORKGROUP
mount.cifs kernel mount options: ip=192.168.0.1,unc=\\Cerberus\root,user= root,,domain= WORKGROUP,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Permission denied? Yes the password in $HOME/bin/cerberus.auth is certifiably the same one I use to log in to LuCI and that I use to ssh to the router.
To add to my frustration:
$ dmesg
...
[429407.822678] CIFS VFS: cifs_mount failed w/return code = -13
Very helpful message, not!
Also:
$ tail /var/log/syslog
...
May 6 19:28:19 bigfoot kernel: [429735.004639] CIFS VFS: cifs_mount failed w/return code = -13
Repetitions of same.
On the router itself neither dmesg
nor /var/log/messages
contains any response to the attempted mount.
Given the Omnia can also work as a NAS, I should have hoped this was a triviality. What is not working here?
Appreciate any tips as to what I’m getting wrong here.