Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] mount USB Stick from modem with SAMBA
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mrfabiolo
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2011
Posts: 90

PostPosted: Thu Mar 07, 2019 12:13 am    Post subject: [SOLVED] mount USB Stick from modem with SAMBA Reply with quote

I inserted my USB drive on the router. I want to mount it and access with cd.

This is from the browser at address 192.168.1.1
image: https://ibb.co/1nk07nf

With thunar is not a problem: it shows up on the left panel; I can create files too.
image: https://ibb.co/cwfnw72

I tried many commands, for example:
Code:
$ cd smb://modem tim/sandisk_sddr-113_1_4c3b/

Code:
$ sudo mount -t cifs '//192.168.1.1/SSDR-113' /mnt

They don't work.


Last edited by mrfabiolo on Thu Mar 07, 2019 10:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
nick_gentoo
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2019
Posts: 140

PostPosted: Thu Mar 07, 2019 6:07 am    Post subject: Re: mount USB Stick from modem with SAMBA Reply with quote

mrfabiolo wrote:
Code:
$ sudo mount -t cifs '//192.168.1.1/SSDR-113' /mnt

This should be the command for mounting the USB drive exported through Samba. What is the exact error message you have when trying it?
First, you should replace 'SSDR-113' by the full name of the folder that you see in Thunar, the one starting with 'SanDisk...'.
Back to top
View user's profile Send private message
mrfabiolo
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2011
Posts: 90

PostPosted: Thu Mar 07, 2019 2:39 pm    Post subject: Reply with quote

If I enter inside asdf directory from thunar I see 'smb://modem tim/sandisk_sddr-113_1_4c3b/asdf/' as shown in the image:
https://ibb.co/wr6yDcL

Code:
$ sudo mount -t cifs 'smb://modem tim/sandisk_sddr-113_1_4c3b/asdf/' /mnt
Mounting cifs URL not implemented yet. Attempt to mount smb://modem tim/sandisk_sddr-113_1_4c3b/asdf/

Code:
$ sudo mount -t cifs 'smb://192.168.1.1/SSDR-113/sandisk_sddr-113_1_4c3b/asdf/' /mnt
Mounting cifs URL not implemented yet. Attempt to mount smb://192.168.1.1/SSDR-113/sandisk_sddr-113_1_4c3b/asdf/

Code:
$ sudo mount -t cifs '//modem tim/sandisk_sddr-113_1_4c3b/asdf/' /mnt
mount error: could not resolve address for modem tim: Unknown error

Code:
$ sudo mount -t cifs '//192.168.1.1/sandisk_sddr-113_1_4c3b/asdf/' /mnt
Password for root@//192.168.1.1/sandisk_sddr-113_1_4c3b/asdf/:
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Code:
$ sudo mount -t cifs '//192.168.1.1/SSDR-113/' /mnt
Password for root@//192.168.1.1/sandisk_sddr-113_1_4c3b/asdf/:
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I've never set the password in the router settings.
So I tried without password (just pressing 'enter'), i tried root's password, my user's password, and the router password (the one I use from browser to go to settings at http://192.168.1.1/). All the same error 'mount error(112): Host is down'.
But i can access from thunar.
I tried this too (with admin's password of the router):
Code:
$ sudo mount -t cifs -o username=admin '//192.168.1.1/SSDR-113' /mnt/altro
Password for admin@//192.168.1.1/SSDR-113:
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


As you can see from the image of thunar, there is no 'Open Terminal Here'. I can usually see that button in any other directory.
Back to top
View user's profile Send private message
nick_gentoo
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2019
Posts: 140

PostPosted: Thu Mar 07, 2019 8:31 pm    Post subject: Reply with quote

mrfabiolo, from all those different variants of mount, try first to make it using this one
Code:
$ sudo mount -t cifs '//192.168.1.1/sandisk_sddr-113_1_4c3b/asdf/' /mnt

The name of the Samba share on the router is 'sandisk_sddr-113_1_4c3b' based on what thunar is showing, so 'SSDR-113' won't work. By the way, why are trying to use 'SSDR-113'?
Also, this
Code:
$ sudo mount -t cifs '//modem tim/sandisk_sddr-113_1_4c3b/asdf/' /mnt
mount error: could not resolve address for modem tim: Unknown error
shows that the name resolution does not work yet, this can be fixed later.

I have one idea, as I had this problem some time ago. There are several versions of the Samba protocol, roughly 1.0, 2.0 and 3.0. Version 1.0 is the oldest and is disabled by default when using mount, due to security issues, but it might be used by your modem if it is an older one. Try to specify the protocol version like this
Code:
$ sudo mount -t cifs -o vers=1.0 '//192.168.1.1/sandisk_sddr-113_1_4c3b/asdf/' /mnt
Back to top
View user's profile Send private message
mrfabiolo
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2011
Posts: 90

PostPosted: Thu Mar 07, 2019 10:41 pm    Post subject: Reply with quote

nick_gentoo, I love you!

Code:
$ sudo mount -t cifs -o vers=1.0 '//192.168.1.1/sandisk_sddr-113_1_4c3b/asdf/' /mnt

that worked.

'SDDR-113' was just a name that appeared in the router settings at http://192.168.1/ .
Back to top
View user's profile Send private message
nick_gentoo
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2019
Posts: 140

PostPosted: Fri Mar 08, 2019 6:59 pm    Post subject: Reply with quote

I'm glad that this works for you.
If you also want to be able to mount the share using the 'modem tim' name instead of the IP address, have a look here: https://wiki.gentoo.org/wiki/Samba#Cannot_resolve_.3Cserver-name.3E
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum