Unable to access smb drive via nemo shortcut [SOLVED]

New to Debian (Or Linux in general)? Ask your questions here!

Unable to access smb drive via nemo shortcut [SOLVED]

Postby bryanmc » 2017-10-03 13:08

First the basics:

Code: Select all
bryan@zed:~$ inxi -Fxz
System:    Host: zed Kernel: 4.9.0-3-amd64 x86_64 (64 bit gcc: 6.3.0)
           Desktop: Cinnamon 3.2.7 (Gtk 3.22.11-1)
           Distro: Debian GNU/Linux 9 (stretch)
Machine:   Device: desktop Mobo: Gigabyte model: GA-990FXA-UD3 v: x.x
           BIOS: Award v: F9 date: 10/22/2012
CPU:       Quad core AMD Phenom II X4 945 (-MCP-) cache: 2048 KB
           flags: (lm nx sse sse2 sse3 sse4a svm) bmips: 24160
           clock speeds: max: 3000 MHz 1: 1800 MHz 2: 800 MHz 3: 2300 MHz
           4: 1800 MHz
Graphics:  Card: NVIDIA GF119 [GeForce GT 610] bus-ID: 01:00.0
           Display Server: X.Org 1.19.2 driver: nvidia
           Resolution: 1920x1080@60.00hz
           GLX Renderer: GeForce GT 610/PCIe/SSE2
           GLX Version: 4.5.0 NVIDIA 375.66 Direct Rendering: Yes
Audio:     Card-1 NVIDIA GF119 HDMI Audio Controller
           driver: snd_hda_intel bus-ID: 01:00.1
           Card-2 Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA)
           driver: snd_hda_intel bus-ID: 00:14.2
           Sound: Advanced Linux Sound Architecture v: k4.9.0-3-amd64
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: ae00 bus-ID: 05:00.0
           IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 500.1GB (12.2% used)
           ID-1: /dev/sda model: ST500DM002 size: 500.1GB
Partition: ID-1: / size: 47G used: 5.6G (13%) fs: ext4 dev: /dev/sda2
           ID-2: /home size: 192G used: 46G (26%) fs: ext4 dev: /dev/sda5
           ID-3: swap-1 size: 6.14GB used: 0.00GB (0%) fs: swap dev: /dev/sda4
Sensors:   System Temperatures: cpu: 36.0C mobo: N/A gpu: 0.0:59C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 169 Uptime: 9:53 Memory: 1360.1/16049.3MB
           Init: systemd runlevel: 5 Gcc sys: 6.3.0
           Client: Shell (bash 4.4.121) inxi: 2.3.5


Now the issue:
I have been able to access my router's (Asus RT-N66U) USB storage forever from my desktop by clicking the network shortcut in nemo and then navigating through to the usb drives mounted on the router. Yesterday while installing slackware on a laptop, I accessed the router storage from that laptop. I believe I also had the storage accessed by my desktop at the same time. Now, when I try to access the router storage from the shortcut in nemo, I get this error "Unable to mount location Failed to retrieve share list from server: No such file or directory". I can, however, access the storage by entering "smb://192.168.1.1" in the nemo location bar. I've searched the error on startpage and here in the forum but I can't seem to find a cure. Most refer to a samba issue, but samba has never been installed on this machine.

I'm obviously overlooking something,,, Can someone give me a nudge in the right direction?
Last edited by bryanmc on 2017-10-12 12:07, edited 1 time in total.
bryanmc
 
Posts: 70
Joined: 2016-11-18 12:21

Re: Unable to access smb drive via nemo "network shortcut

Postby pylkko » 2017-10-04 11:33

Are you using the stock Linux(asus wrt) that the router comes with? You don't need to have installed Samba on the Debian machine as it will likely have been installed with the desktop environment you are using. There are many different ways to solve this problem. However, I am not sure if I understand what you mean. Can you describe better how you used to use it/how you would like it to work?
User avatar
pylkko
 
Posts: 1213
Joined: 2014-11-06 19:02

Re: Unable to access smb drive via nemo "network shortcut

Postby bryanmc » 2017-10-04 13:14

I'm using the Asus WRT-Merlin firmware. As far as I can tell (checking in synaptic) samba is not installed although three of its library files are. As far as how I use it, I store various files on the router's usb storage that I don't want cluttering up the hard drive. When I need to access them, I open nemo and click on network. Sometimes the router icon will be available after clicking network (along with a "windows network" icon, other times the only icon that shows up is "windows network", but clicking that will bring up the icon for the router. Currently clicking the network icon only brings up the windows icon and clicking that results in the error msg from the first post.

Since I can still access the drives by typing their location in the bar in nemo, they're still available but obviously something has changed.
bryanmc
 
Posts: 70
Joined: 2016-11-18 12:21

Re: Unable to access smb drive via nemo "network shortcut

Postby pylkko » 2017-10-04 17:10

That's good because the stock firmware was much more poorly configurable on that device (than merlin).

I have access to a router almost identical it is a RT-AC66U and I just took my Debian machine over and put a samba share on it. I could directly connect to it in nautilus. BTW. You don't need to have samba installed on the client machine that you are accessing the share on. That is, in your particular case, you only need samba installed on the router not on the machine, because there are samba clients (like the one that nemo is using) that can access the server.

Is there some reason you don't use NFS, as that is also available on merlin and in my experience not only is the performance better, but it works more reliably.

In the past I have come across the case where just what you describe happens, and when you modify the name resolve order in the configuration file (smb.conf) and restart it, this problem goes away. The modification is to put "bcast" at a higher priority (like first). IIRC this should work better on small networks anyway, but I forget the details. The line is parsed so that what comes first in reading order (from left to right) is used first and what is more right is used only if needed. You could try that. This is one of those things that I think you cannot do on the stock asus firmware as the entire OS image is tmp and reset when you reboot the router. You should at least try it as you face nothing to loose by doing it although it is possible that your problem is different and that this will not help you.

Also just try to restart the daemon and see if that helps.

There was a security update to libsmbclient on the 22nd of Sep.
https://www.debian.org/security/2017/dsa-3983

but maybe it would be easier if youd'd share more of your conf
User avatar
pylkko
 
Posts: 1213
Joined: 2014-11-06 19:02

Re: Unable to access smb drive via nemo "network shortcut

Postby bryanmc » 2017-10-04 19:39

pylkko wrote:but maybe it would be easier if youd'd share more of your conf


Here's the router smb.conf file...

Code: Select all
admin@RT-N66U-C7A0:/tmp/etc# cat smb.conf
[global]
workgroup = WORKGROUP
netbios name = RT-N66U-C7A0
server string = RT-N66U-C7A0
unix charset = UTF8
display charset = UTF8
log file = /var/log.samba
log level = 0
max log size = 5
auth methods = guest
guest account = admin
map to guest = Bad Password
guest ok = yes
encrypt passwords = yes
pam password change = no
null passwords = yes
force directory mode = 0777
force create mode = 0777
max connections = 5
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=65536 SO_SNDBUF=65536
obey pam restrictions = no
disable spoolss = yes
host msdfs = no
strict allocate = No
wide links = no
bind interfaces only = yes
interfaces = lo br0 192.168.1.1/255.255.255.0
use sendfile = no
map archive = no
map hidden = no
map read only = no
map system = no
store dos attributes = yes
dos filemode = yes
oplocks = yes
level2 oplocks = yes
kernel oplocks = no
enable core files = no
deadtime = 30
load printers = no
printable = no
max protocol = SMB2
smb encrypt = disabled
min receivefile size = 16384
passdb backend = smbpasswd
smb passwd file = /etc/samba/smbpasswd
[sda1]
comment = SanDisk Cruzer Glide's sda1
veto files = /.__*.txt*/asusware*/asus_lighttpdpasswd/
path = /tmp/mnt/sda1
writeable = yes
dos filetimes = yes
fake directory create times = yes
[sdb1]
comment = SanDisk Ultra's sdb1
veto files = /.__*.txt*/asusware*/asus_lighttpdpasswd/
path = /tmp/mnt/sdb1
writeable = yes
dos filetimes = yes
fake directory create times = yes
admin@RT-N66U-C7A0:/tmp/etc#
bryanmc
 
Posts: 70
Joined: 2016-11-18 12:21

Re: Unable to access smb drive via nemo "network shortcut

Postby pylkko » 2017-10-05 03:48

This is a very bizarre and and unsual conincidence that some one else (me here) has the same setup and can check it. Well anyway, I just catted the smb.conf of the router that also runs this firmware and all the lines were the same except your's has minimum samba set to SMB2 and the one that works with nautilus has NT1. I'm fairly sure that nautilus uses the same smbclient as nemo...

So it could be that for whatever reason, the problems stem from that config. Maybe try not using SMB2? these different versions of SMB are somewhat annoying, for example Win10 computers refuse to work with SMB2 without some configuration hacking.

Anyway, the reason I was thinking about the other solution is that you said you can connect with the ip number, but that you cannot get the share broadcast from the router. So it could be some kind of name resoution error (btw. does it work if you us the lan address instend of the ip?). So if you look at this document about name resolution on samba:
https://www.samba.org/samba/docs/using_samba/ch07.html

And see section "name resoution"...

Code: Select all
bcast

    Uses the broadcast method



Try to move bcast to first in the list in the global section:
Code: Select all
    name resolve order = wins lmhosts hosts bcast


'Then restart the samba service on the router and does it help?
User avatar
pylkko
 
Posts: 1213
Joined: 2014-11-06 19:02

Re: Unable to access smb drive via nemo "network shortcut

Postby bryanmc » 2017-10-05 13:16

So, I need to add that section to the smb.conf file in the router?
bryanmc
 
Posts: 70
Joined: 2016-11-18 12:21

Re: Unable to access smb drive via nemo "network shortcut

Postby bryanmc » 2017-10-07 15:39

pylkko wrote:Try to move bcast to first in the list in the global section:
Code: Select all
    name resolve order = wins lmhosts hosts bcast


'Then restart the samba service on the router and does it help?


" name resolve order = wins lmhosts hosts bcast" was not present in etc/smb.conf so I added it ( and moved bcast to the front). Restarted samba on the router and the problem persists.
bryanmc
 
Posts: 70
Joined: 2016-11-18 12:21

Re: Unable to access smb drive via nemo "network shortcut

Postby pylkko » 2017-10-09 16:50

what else did you try?
User avatar
pylkko
 
Posts: 1213
Joined: 2014-11-06 19:02

Re: Unable to access smb drive via nemo "network shortcut

Postby bryanmc » 2017-10-09 23:39

I went back in to the smb.conf file and found that my changes were no longer there. I re-edited the file and stopped and started the service and my edit was gone again. Then I noticed that my edits were in /tmp/etc/smb.conf but I'm not sure where to edit so the changes will persist.

Code: Select all
ASUSWRT-Merlin RT-N66U 380.68-4 Wed Oct  4 19:00:18 UTC 2017
admin@RT-N66U-C7A0:/tmp/home/root# cd /
admin@RT-N66U-C7A0:/# cd etc
admin@RT-N66U-C7A0:/tmp/etc#
bryanmc
 
Posts: 70
Joined: 2016-11-18 12:21

Re: Unable to access smb drive via nemo "network shortcut

Postby pylkko » 2017-10-11 18:18

The changes will not stay, as the router image is based on a temporary system. You need to use jffs to get an area where your edits will pertain. I believe this is a common practivce on router systems, so that if you get hacked and some one changes files, all you need to do is reboot and all goes back to normal. The system image is aread-only compressed SquashFS. However, in order for you to have a normal root where you have read write access.. using overlayfs WRT (AsusWRT and Merlin) overlay a read-only compressed SquashFS file system with a writable JFFS2 file system in a copy-on-write fashion. So you have a seperate part where your scripts or modifications are at and when the temporary system is created from the readonly image, your changes are added to that.
see:
https://github.com/RMerl/asuswrt-merlin/wiki/Jffs
https://github.com/RMerl/asuswrt-merlin ... er-scripts

I was also wondering whether or not you tried to change the SMB2 configuration?
User avatar
pylkko
 
Posts: 1213
Joined: 2014-11-06 19:02

Re: Unable to access smb drive via nemo "network shortcut

Postby bryanmc » 2017-10-12 00:05

The part that's confusing me is that it was working correctly until I connected a laptop with slackware to the share at the same time I had the desktop with debian connected to it. Nothing could have been changed in the router that wouldn't be undone by a reboot from what you're telling me, so it leaves me wondering what has changed. I'm reading the links you provided but it will take me a while to digest the info as it's a bit over my head currently. I can't understand why after months of working correctly, the share list is no longer available.
bryanmc
 
Posts: 70
Joined: 2016-11-18 12:21

Re: Unable to access smb drive via nemo "network shortcut

Postby pylkko » 2017-10-12 04:26

I think the most likely candidate here is that something changed in either the Merlin firmware (I am assuming here that you have kept it up to date) or something changed in the samba clients on the machines. There were some pretty serious security flaws found this year in Samba, and because of this security patches were released. These patches could be restricting configurations/ways of access that were previously available. You might have not noticed this the moment when these patches were released if you didn't restart the machines/unmount the share daily. It is pretty common for samba to have these kind of issues in my experience, and this you can see by googling your problem (i.e "can connect with ip but not through workgroup" etc). I personally moved using NFS because of this

I would consider the fact that you connected the Slackware machine to be just a coincidence, unless there is some more information that suggests that scenario as likely. For example, are you sure that you are allowing more than one connection? I don't have access to a Asus router right now, but there might be a configuration option that restrict the amount of simultaneous connections to some number (perhaps it is set to 1?)
User avatar
pylkko
 
Posts: 1213
Joined: 2014-11-06 19:02

Re: Unable to access smb drive via nemo "network shortcut

Postby bryanmc » 2017-10-12 12:05

I found the issue. As much as it embarrasses me to admit, at some point, for some reason I switched UFW on. The firewall was blocking it. I appreciate all your help and the fact that you made me look into and learn a few things that I otherwise might not have learned. I think I'll go sit in the corner and hit myself in the head with a foo stick... :oops: :roll:
bryanmc
 
Posts: 70
Joined: 2016-11-18 12:21

Re: Unable to access smb drive via nemo "network shortcut

Postby pylkko » 2017-10-12 17:46

You should realize that you can also allow samba in ufw...
User avatar
pylkko
 
Posts: 1213
Joined: 2014-11-06 19:02

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable