6

I'm having some trouble mounting shares on 11.10. I've installed pyNeighborhood through which I can mount windows shares as root. I want to be able to mount them as non-root so that I can write to the shares. I did some googling and tried a few things, but none of it helped:

sudo chmod 6755 /sbin/mount.cifs
sudo chmod 6755 /bin/umount
sudo chmod u+s /sbin/mount.cifs
sudo chmod u+s /bin/umount

Any ideas?

Mounting gives this error:

mount.cifs: permission denied: no match for /home/myUser/pyNeighborhood/WORKGROUP/myServer/myShare found in /etc/fstab
4
  • What exactly doesn't work, what error does mount.cifs give?
    – jelmer
    Dec 19, 2011 at 15:04
  • mount.cifs: permission denied: no match for /home/myUser/pyNeighborhood/WORKGROUP/myServer/myShare found in /etc/fstab
    – theAngler
    Dec 19, 2011 at 23:49
  • This question appears to be abandoned as there hasn't been any activity for a longer period of time. I'm voting to close it for now. If by any reason you think this question is still viable or useful in anyways or that there is still a good chance it will be answered please flag it to a moderator or add a comment with the reasons why you want it reopened. Thanks!
    – htorque
    Feb 25, 2012 at 21:42
  • This is a security restriction in recent versions of Samba. See bugs.launchpad.net/ubuntu/+source/cifs-utils/+bug/657900
    – tripleee
    Mar 25, 2013 at 10:29

1 Answer 1

2

If the USER has to mount it, you can always use GVFS. Its the same as clicking, Places > Network > Server > Path and seeing that pretty icon in the Places folder, and your desktop.

Term: gvfs-mount smb://serverip/path

This will add it to the places menu, and allow you to unmount it without using root.

Drawbacks:

  • Shares goto ~/.gvfs by default, you can always map them to another area if needed. If you are a click based person this wont matter to you.
  • If there is a password on the share, there is no way to auto mount it. Must be done manually.

If these are fixed shares you create at the boot process, you can use fstab and CIFS.

Add a line like this to your fstab file.

Open Share:

//serverip/path /mnt/path cifs dir_mode=0775,guid=1000 0 0

Passworded share:

//serverip/path /mnt/path cifs credentials=/root/.smbpass,dir_mode=0775,guid=1000 0 0

For a passworded share, create a file /root/.smbpass Add lines like this to it...

username=<user>
password=<pass>
3
  • gvfs-mount smb://myServer/myShare Error mounting location: Failed to mount Windows share
    – theAngler
    Dec 19, 2011 at 23:46
  • Make sure you are using the IP, not the host name. =) If you still receive the error verify the windows box is sharing correctly.
    – vkcaspervk
    Jan 9, 2012 at 2:04
  • On Ubuntu 22 I get this error (from kern.log) when I try to mount using the guid option: ``` cifs: Unknown parameter 'guid' ```
    – Raleigh L.
    Aug 12, 2022 at 4:30

Not the answer you're looking for? Browse other questions tagged .