0

I installed Ubuntu 20.04 desktop on a new computer yesterday, and today I am trying to connect to a Windows 10 share on my internal network (LAN) with CIFS. The Windows 10 machine has two drives, and it shares its D: drive as "D Share" with a space. Other Windows computers on this network regularly attach to this share, so I know it's active. I also verified that the machine is at 192.168.0.2.

I have tried many configurations of the share name, but all attempts return "mount error(2): No such file or directory" and dmesg returns:

CIFS:   VFS: BAD NETWORK NAME: \\192.168.0.2\D:
CIFS:   VFS: cifs_mount failed w/return code = -2

I have tried these:

sudo mount -t cifs -o username=James96,password=abcde //192.168.0.2/D: /mnt/smb_share
sudo mount -t cifs -o username=James96,password=abcde //192.168.0.2/D/ /mnt/smb_share
sudo mount -t cifs -o username=James96,password=abcde //192.168.0.2/D Share /mnt/smb_share (this one returns "bad usage" so it doesn't like the space).  
sudo mount -t cifs -o username=James96,password=abcde //192.168.0.2/$D Share /mnt/smb_share
sudo mount -t cifs -o username=James96,password=abcde //192.168.0.2/D_Share /mnt/smb_share

So my question is: how do I specify the share name where it's shared as D Share in Windows?

Other info:

$ uname -r 
5.13.0-30 generic
$ mount.cifs -V
version 6.9

Thanks for any help.

5
  • Does the /mnt/smb_share directory exist, before the mount?
    – waltinator
    Commented Feb 22, 2022 at 22:36
  • Yes that folder exists. I created it yesterday.
    – RTC222
    Commented Feb 22, 2022 at 22:39
  • 1
    I can't see that you tried to escape space or use quotation mark. So this should work: sudo mount -t cifs -o username=James96,password=abcde "//192.168.0.2/D Share" /mnt/smb_share and sudo mount -t cifs -o username=James96,password=abcde //192.168.0.2/D\ Share /mnt/smb_share
    – Mateusz
    Commented Feb 22, 2022 at 23:28
  • Thanks for that comment. I will try it in quotes. I just solved the problem another way -- I created a share on folder on that drive, and the share name has no spaces in it. That worked. So the problem was the space and your answer should help.
    – RTC222
    Commented Feb 22, 2022 at 23:36
  • @Mateusz -- yes, you're right. When I put it in quotes as you showed it works. Thanks.
    – RTC222
    Commented Feb 22, 2022 at 23:41

0

You must log in to answer this question.

Browse other questions tagged .