Cannot mount remote drive. I get the error: mount.cifs: bad UNC (/servername//data.xxx.xxx.ac.uk/)
43,700
Solution 1
UNC syntax is //server/share
, not /server//share/
. Note double slash before the server name, one slash between the server name and the share name.
Solution 2
You have to use double slash for mounting command. Like this
sudo mount -t cifs //xxx.xxx.xxx.xxx/Folder_1/ /media/usb/ -o user=admin
Related videos on Youtube
Author by
Ahmet Ozturk
Updated on September 18, 2022Comments
-
Ahmet Ozturk almost 2 years
I am trying to access a remote drive from my PC using fstab but I get an error:
$ sudo mount -a mount.cifs: bad UNC (/servername//data.xxx.xxx.ac.uk/)
This is how my fstab looks:
/servername//data.xxx.xxx.ac.uk/ /media/windowsshare cifs iud=myuserid,password=mypassword,iocharset=utf8,sec=ntlm 0 0
How can I fix it?
-
Ahmet Ozturk over 7 yearsInstead of that error, I now get this. "mount error: could not resolve address for servername: Unknown error
-
AlexP over 7 yearsYou should of course use the actual name of the server and not "servername". Before trying
sudo mount -a
check that the name is resolvable, using for examplehost servername
(of couse, with the actual name instead of "servername"). -
Hubro over 5 yearsAnother note, I've always used
\\server\share
(backslash rather than forward slash) and it has always worked when just using fstab and mount, but it doesn't work when systemd tried to perform the mount. It throws the error "Invalid UNC path: \server\share".