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
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.
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!