Struggling to mount network drive on VM

I am running (L)Ubuntu on a VM and am trying to permanently mount a network drive attached to my DDWRT router. I have had no issues mounting it on numerous RPis and Windows PCs. However, I keep getting an error that there is no such file or directory, despite it being listed with smbclient.

Command:

sudo mount -t cifs -o username=mediadrive //192.168.1.1/MediaDrive /mnt/MediaDrive

/mnt/MediaDrive does exist as does //192.168.1.1/MediaDrive

Here is the error:

You haven’t given any details as to OS releases (Lubuntu or other OSes), but I’ve found since WannaCry which didn’t impact linux boxes, but had devastating impact on windows machines, patches came out that require the listing of version, ie. vers= values as options. I don’t use SaMBa much so haven’t explored it, except find OSes more modern than 2017-WannaCry tend to need you to specify the version.

Despite this, does /mnt/MediaDrive/ exist as a directory to allow mounting to that directory? Check the case matches too.

Hi,
Thanks for the response.

Lubuntu is the latest version.
/mnt/MediaDrive/ definitely exists as a directory.
The drive is attached to a DDWRT router, so that is the “OS” I suppose. The VM is running on Windows 10.
As you can see in the screenshot, Lubuntu can “see” the shared folder, and the cases match exactly.

I will try adding vers=something tonight, but I have no idea what version I would use.

I would rather you provide you release, to far more people on forums treat *ubuntu 18.04 LTS is the latest as it is the latest LTS release, despite the fact that two releases (18.10 & 19.04) have occurred since then.

The age of your DDWRT router (particularly it’s software) is what I’d use to pick vers= value. DDWRT is a linux box and for my old ddwrt thing it still runs linux kernel 2.6 so vers=1.0 maybe required (on more modern boxes like my Lubuntu workstation), but your DDWRT could be newer than mine (key date is before OR after wannacry as it caused the most change with SaMBa since creation in 1983 in my opinion).

As for case - the most important thing is the mkdir command that created the directory, but nothing in your post provides that detail (if created earlier, a stat etc. of it wasn’t included), thus there is no proof of it’s existence in your provided detail outside of your “does exist” explanation; why I suggested checking…

It could also be you have need to provide a ,password= value for mounting to occur which caused your rejection. smbclient doesn’t need any password as protocol doesn’t require it, but the mount will access data so will require it if the DDWRT client has been setup with username/password combination.

Lubutunu version is 19.04. My DDWRT version is 3.0
But when I try to add vers=1.0, or vers=3.0 I get “mount: bad usage”
The drive does have a password, which I enter when it prompts me.
The /mnt/MediaDrive folder was created using mkdir.

However, I have just looked in my ‘Network’ folder, and while it definitely wasn’t there yesterday, I now have ‘DDWRT’ listed as a device, and inside that was ‘MediaDrive’. This lets me access the folder through the GUI, but does not mount it. Unfortunately this doesn’t help me use it as a download folder.

EDIT: The vers=1.0 was the key. I forgot to add a comma between it and the username. Thanks guiverc!

On the picture, you are trying to mount it to /mnt/Mediadrive and not /mnt/MediaDrive.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.