I have a headless server running Ubuntu 16.04 with a VM setup with KVM for downloads that is also running Ubuntu 16.04. I can mount a samba share from the downloads server to the main one using sudo mount -t cifs -o username=user,password=blah // /mnt/dl with no issues. However, I also want to mount a folder from the main server to the downloads one, but whenever I try sudo mount -t cifs -o username=user,password=blah // /mnt/HD3 I get an error message mount error(6): No such device or address. Also, when I try using smbclient to login I get the following tree connect failed: NT_STATUS_BAD_NETWORK_NAME

I can see the HD3 share on all of my other computers, the path to the share is correct and my username and password are the same for both servers. And the IP address are correct as well. I'm not sure what the issue is and any help would be appreciated.


So I did a little more digging in the man pages and saw there was an --verbose option that I could use, so I ran it with with the following results:

mount.cifs kernel mount options: ip=,unc=\\\files,user=user,prefixpath=HD3/,pass=********
Retrying with upper case share name
mount.cifs kernel mount options: ip=,unc=\\\FILES,user=user,prefixpath=HD3/,pass=********
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

It appeared that for some reason it was trying to look for as a share, which I hadn't shared. So I added that directory as a share and then tried sudo mount -t cifs -o username=user,password=blah // /mnt/HD3 again and it mounted with no problem.

This brings up another question, why can't I use cifs to share a folder that is a few directories away from the root? It seemed once I added a folder that was one step away, it fixed the issue. I would prefer not sharing my entire /files folder, even if I'm the only one who can access the share.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.