21

I am running Ubuntu 11.10 and I own a Netgear N600 Wireless Dual Band Router with a USB port built into it. Naturally, the router came with instructions on how to mount and view this drive with both Windows and Mac, but nothing about Linux. I have an WD Elements 1 TB external HDD that I would like to plug into the router and share across my home network. However, when I plug it in, absolutely nothing happens on my desktop.

I checked on two different machines and nothing seems to indicate that the drive has been mounted (or is even seen at all) on either machine. I am fully aware that it may not be possible to do this with a Linux system, but I was hoping someone might have a suggestion.

jokerdino
  • 41,320
Shawn
  • 1,468

6 Answers6

12

Do you know your router's IP address? (usually 192.168.1.1, but it may vary).

Open a File Browser (Nautilus) window, then press Ctrl+L and in the location bar that appears type

smb://192.168.1.1

that may give you access to the disk, which is usually published to the network via the SMB protocol.

roadmr
  • 34,222
  • 9
  • 81
  • 93
  • This worked for me to connect to the drive, a normal USB SSD connected to a Linksys router, but (X)Ubuntu drops the connection every minute or so. Getting really tired of Ubuntu lately, Why will it not maintain a connection during file transfer from the external drive??? – Rin and Len Jun 07 '22 at 08:03
11

As of 10/23/2012
You need CIFS not SAMBA :

  1. sudo apt-get install cifs-utils
  2. Add //192.168.1.1/USB_Storage /media/public cifs guest 0 0 to your /etc/fstab

I would not have gotten this far without the original answer so thank you.

NorTicUs
  • 2,382
LEO
  • 111
6

I have this same router and just figured out how to access an external drive via Ubuntu. I wrote a blog post with the details but here's the short version:

  1. Install the smbfs package (sudo aptitude install smbfs).
  2. Create a directory in which to mount your external hard drive (e.g., sudo mkdir /media/public).
  3. Add a line to the file /etc/fstab (gksudo gedit /etc/fstab) - at the end of the file add this line: //192.168.1.1/USB_Storage /media/public smbfs guest 0 0
  4. Save your newly updated fstab file then remount your drives (sudo mount -a); you should now be able to see your new external drive at /media/public.
Eliah Kagan
  • 117,780
  • 1
    I do exactly what you said and I get this error "mount: unknown filesystem type 'smbfs'", to fix it I had to use cifs instead of smbfs – Medya Mar 28 '13 at 13:30
  • how would you do this without modifying fstab? I mean, what's the complete mount command? – m4l490n Feb 10 '19 at 21:01
2

I have had similar issues with router a year ago. "roadmr" has a great potential solution, but there is a slight chance you might be on 192.168.0.1

in which case you would enter smb://192.168.0.1 (or other depending on your ip)

...although the most common would be 192.168.1.1 as "roadmr" suggested.

Apologies if you have already tried this, but... enter the terminal and type ifconfig.


This will display your IP information

I'm fairly new to Linux, but have worked with networks for a bit, so I just wanted to throw it out there to you that 192.168.1.1 might not be your IP, as I set my router to a more ambiguous IP, or I hide the network altogether.

jokerdino
  • 41,320
2

Good instructions above to make the disk visible, but however, if you want to make it writable for the user, you have to define it with the uid & gid options in your mount command. To find out the uid (numerical User ID) & gid (numerical group ID) of your user, you can use the command:

id <user>

Then note the values in uid= and gid= -fields. Once done, you can test it by giving the following command:

sudo mount -o nosuid,uid=<insert uid here>,gid=<insert gid here> //192.168.1.1/USB_Storage/ /media/public/

If your disk is now writeable, then you can add the same permissions in the fstab entry:

//192.168.1.1/USB_Storage/ /media/public/ cifs guest,uid=<insert uid here>,gid=<insert gid here> 0 0

EDIT: Confirming that this works on a hard drive plugged with USB into a D-LINK DIR-868L (ubuntu 14.04). Instead of USB_Storage you should use the device's name, which can be found on web GUI of the router (Setup -> Storage ->Device). Dont forget to check the IP address as well (it may not be 192.168.1.1).

GGranath
  • 3
  • 3
Ossi Viljakainen
  • 489
  • 2
  • 5
  • 15
  • Hello, my home computer has a guest user with no password. If i wanted to exclude that user from seeing my Network drive what should I do? Im using a similar router with 2TB of storage. Should've bought 4TB one :( – answerSeeker Sep 04 '15 at 04:41
  • sudo mount -o nosuid,uid=,gid= //192.168.1.1/USB_Storage/ /media/public/ won't mount under public but under media – answerSeeker Sep 04 '15 at 04:43
  • I don't understand the 'Unable to find suitable address' below: john@Desktop:~$ sudo mount -o nosuid,uid=1000,gid=1000 //192.168.1.1/ExternalHDD/ /media/Public/ Password for root@//192.168.1.1/ExternalHDD/: Unable to find suitable address.

    Any ideas why?

    PS I get this message irrespective of the password that I type.

    – John Rose May 21 '16 at 10:43
0

I used smbfs and after compiled it , you will find mount.smbfs under example script mount. I am sure you can get that from tar file after you installed binary? I used that command to mount. N600 does not seems to understand cifs.

  • In my case USB flash drive patch is visible via smb URL smb://192.168.1.1/USB_Drive_Storage_Media, but can not be opened (inactive). – minto Oct 19 '17 at 08:49