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
Jorge Castro
  • 73,717

1 Answers1

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>