2

I am trying to mount a shared drive on my CentOS PC. However, when I run

gvfs-mount smb://the.server.address/path_on_server

I get the error Error mounting location: Failed to mount Windows share: No such file or directory and running the same command with sudo gives Error mounting location: volume doesn't implement mount.

I also appear not to have a gvfs directory. After looking into the problem I found suggestions sayinggvfs-fuse package was required. I tried installing the package and adding myself to the fuse group (after creating it) but the same error still occurs. I haven't found anything about this specifically for CentOS - all my other seaches return Ubuntu solutions for similar but ultimately different problems.

Kvothe
  • 477
  • Why not just use mount -t cifs? – Jesse K Oct 14 '15 at 15:29
  • The initial instruction from our IT department was to use the command I gave. I'll have a try with your suggestion – Kvothe Oct 14 '15 at 15:38
  • At a minimum, the syntax will be something like mount -t cifs //fileserver/desired/path /mount/point -o <various options, for example: username=,domain=> – Jesse K Oct 14 '15 at 15:51
  • @JesseKeilson I just tried mount cifs and I get the error mount error(6): No such device or address – Kvothe Oct 14 '15 at 16:03
  • Sounds like your //fileserver/desired/path is off. – Jesse K Oct 14 '15 at 16:58
  • @JesseKeilson A trip to IT support it is then – Kvothe Oct 14 '15 at 17:09
  • I agree with Jessie Kielson, mount is much easier. But you have to be root. You can also add the mount to /etc/fstab (it must be in fstab format) and the share will be mounted automatically at boot. You can also check what cifs shares are offered by a host with the command : smbclient -L ip.address -U username (you can use hostname also instead of IP address) – magor Oct 14 '15 at 21:25

1 Answers1

2

I think You'll find the answer here:
Samba mount with password prompt as non-root user

For me, after exporting dbus-launch values, the gvfs-mount did not give error anymore :

export $(dbus-launch)
gvfs-mount smb://workgroupname\;username@hostname/sharename
magor
  • 3,752
  • 2
  • 13
  • 28
  • Thanks for your response - unfortunately I am getting exactly the same error still. – Kvothe Oct 14 '15 at 14:03
  • Actually, I now get asked for username, domain and password - and the it says Error mounting location: Failed to mount Windows share: No such file or directory. I don't suppose you know what could cause that? – Kvothe Oct 14 '15 at 14:13
  • I had to install some packages too...like gvfs-smb. Also, i can only browse the mounted stuff in the graphical interface, don't know yet how to use it in the terminal. I also created a folder /root/fuse and used the gvfsd-fuse /root/fusecommand. In order to avoid asking password, I had to disable in Windows this feature (rightclick network icon, open network and sharing center/change advanced sharing settings/in All networks Turn off password protected sharing) – magor Oct 14 '15 at 14:14