LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-03-2018, 08:57 AM   #1
MikeinGrange
LQ Newbie
 
Registered: Oct 2015
Location: England
Distribution: 19.3 Mint Cinnamon
Posts: 23

Rep: Reputation: Disabled
Cannot access files on router USB


I have recently installed Linux Mint 19 Cinnamon (version 3.8.8, kernel 4.15.0-20 generic) running in VMware Workstation 14 Player (version 14.1.3 build 9474260) on host Windows 10 Pro (version 1803 build 17134.228).

I created a folder on the desktop & then used the following mount command in terminal in order to access the documents folder from the desktop PC (called Chillblast):
sudo mount.cifs //192.168.1.88/Documents-on-Chillblast Desktop/Docs-on-Chillblast -o user=~~~~,password=~~~~
This worked fine and the Documents folder from the desktop PC can be accessed under Linux.

In a similar way I next I tried to access a folder that is on a USB drive attached to the router. My Terminal command was:
sudo mount.cifs //192.168.1.1/Common-docs-on-router Desktop/Common-docs-on-router -o user=~~~~,password=~~~~~
In this case the user name & password were the relevant ones for the router, not the same as previously for the desktop PC. This mount command failed, the message being:
Mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


The router was not down, as I could immediately log onto it from a browser under Windows on the desktop PC. The page in the manual to which I was referred threw no light on the problem. My user name on Windows and Linux is mike, and on the router mike has R/W permission for all files.

Can anyone suggest where I have gone wrong?
 
Old 09-03-2018, 09:13 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Hello

The error message "host is down" usually means the server is responding, but not on the ports used by file sharing. You could get that error message if the file service sharing is stopped or disabled. And samba/cifs have different versions, so it could be the client/server is not on the same version. It could be you need to add "-o vers=X.0" to the mount command.

Here's a link with some workarounds:

https://serverfault.com/questions/41...s-host-is-down
 
1 members found this post helpful.
Old 09-04-2018, 11:47 AM   #3
MikeinGrange
LQ Newbie
 
Registered: Oct 2015
Location: England
Distribution: 19.3 Mint Cinnamon
Posts: 23

Original Poster
Rep: Reputation: Disabled
Yes, the missing version number was the problem. I amended the option string to:
-o vers=1.0,username=~~~~,password=~~~~
and the mount command now works. Many thanks for your response.

A follow-on question, if I may.
How do I ensure that the mount.cifs commands are executed automatically at log-on?
 
Old 09-05-2018, 01:39 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
It may be that you can mount shares at boot time with an fstab entry. Something along these lines.

https://wiki.ubuntu.com/MountWindowsSharesPermanently
 
Old 09-08-2018, 11:48 AM   #5
MikeinGrange
LQ Newbie
 
Registered: Oct 2015
Location: England
Distribution: 19.3 Mint Cinnamon
Posts: 23

Original Poster
Rep: Reputation: Disabled
Many thanks jefro for the link that you provided. However, my application (or misunderstanding) of its information had an unexpected result. In Terminal I did:

sudo gedit /etc/fstab and then added the following two lines to the end of /etc/fstab:

//192.168.1.88/Documents-on-Chillblast /home/mike/Desktop/Docs-on-Chillblast auto username=~~~,password=~~~,iocharset=uft8 0 0
//192.168.1.1/Common-docs-on-router /home/mike/Desktop/Common-docs-on-router auto vers=1.0,username=~~~,password=~~~,iocharset=uft8 0 0


I then did:

sudo mount –a

All appeared to be OK, no error was reported, and both sets of files were now accessible. However, on restarting, the following error message was given;
Click image for larger version

Name:	L-error.jpg
Views:	23
Size:	139.7 KB
ID:	28557
Using nano I edited /etc/fstab by commenting out the two lines that I had entered earlier, and after a restart I was back to the previous position. Which leaves me with some questions:

1. What was wrong with the two lines that I added to /etc/fstab?
2. Why didn’t the command sudo mount –a report an error?
3. How else can I check the integrity of any changes that I make to /etc/fstab?

Any further thoughts?
 
Old 09-08-2018, 01:20 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,749

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
I would use cifs instead of auto. Network mounts should wait until the network becomes available which I believe is handled by the NetworkManager-wait-online.service. I assume that systemd can not tell this is a network mount and since the network isn't up yet results in your error message.

If you are not using NetworkManager then you might look into systemd-networkd-wait-online.service, x-systemd.automount or autofs.
 
1 members found this post helpful.
Old 09-10-2018, 09:18 AM   #7
MikeinGrange
LQ Newbie
 
Registered: Oct 2015
Location: England
Distribution: 19.3 Mint Cinnamon
Posts: 23

Original Poster
Rep: Reputation: Disabled
Cannot access files on router USB

Many thanks michaelk. In /etc/fstab for both lines I changed auto to cifs and also specified vers=1.0 for both. The two sets of files are now accessible and there is no problem on a restart.

There was one oddity which hasn't (yet) caused a problem. After I did the gedit I was given three warning messages:
gedit:3649 ... Set document metadata failed: Setting attribute metadata: : gedit-spell-language not supported
ditto ... gedit-encoding not supported
ditto ... gedit-position not supported

The attachement shows a listing of the fstab contents. Is the warning message anything to be concerned about?
Click image for larger version

Name:	L-error.jpg
Views:	30
Size:	191.3 KB
ID:	28565
 
Old 09-10-2018, 03:42 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
I think the warnings were from using gksudo or something along those lines???
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cannot access USB drive on router MikeinGrange Linux - Server 2 09-25-2017 03:05 PM
[SOLVED] Transfer files between Virtual box and nomachine without router access jayzon Linux - Virtualization and Cloud 2 03-05-2014 05:30 AM
[SOLVED] can't access files in usb drive in terminal sequimbob Linux - Newbie 4 08-24-2013 05:21 PM
How to network USB modem and clients behind external router for internet access? husten Linux - Networking 4 10-26-2008 07:07 AM
ADSL router USB Access crash_override_me Linux - Networking 2 10-18-2008 10:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration