LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Can't automount CIFS as normal user (https://www.linuxquestions.org/questions/linux-general-1/cant-automount-cifs-as-normal-user-553463/)

SlowCoder 05-12-2007 07:57 PM

Can't automount CIFS as normal user
 
Using a tutorial found here: http://lists.olug.org/pipermail/olug...er/015520.html
I have set up my mountpoint.

My fstab entry currently is:
Code:

//192.168.1.101/e$ /mnt/greendata cifs    rw,noauto,user,credentials=/etc/samba/cred_green 0 0
I am able to mount successfully as root, and can access rw the mount as normal user once mounted as root.

However, what I can't do is mount as the user.

Based on the tutorial I tried:
Code:

//192.168.1.101/e$ /mnt/greendata cifs    rw,noauto,user,credentials=/etc/samba/cred_green,uid=500,gid=500 0 0
Other ideas were:
Code:

//192.168.1.101/e$ /mnt/greendata cifs    rw,noauto,user,credentials=/etc/samba/cred_green,uid=[username] 0 0
//192.168.1.101/e$ /mnt/greendata cifs    rw,noauto,user,credentials=/etc/samba/cred_green,noperm 0 0

As normal user, executing the command: "mount greendata", I get the following error:
Code:

mount error 1 = Operation not permitted
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

So far, no luck. Help?

titopoquito 05-13-2007 05:08 PM

I have a similar problem, that a normal user cannot mount the cifs share (it was possible with smbfs though before that). My workaround is to write the fstab entry and add permissions for the user or all users to mount with "sudo". That way it works flawlessly. I do not use the credentials part, don't know if it makes a difference.

My fstab entry
Code:

//192.168.124.126/C  /mnt/nike/c          cifs      noauto,users,rw,guest,uid=1000,gid=100,iocharset=iso8859-15,codepage=cp850 0 0
My sudo entry (created by launching "visudo"):
Code:

%users ALL=NOPASSWD:/sbin/mount /mnt/nike/c
 %users ALL=NOPASSWD:/sbin/umount /mnt/nike/c

Hope this helps :)

archtoad6 05-14-2007 10:53 AM

In order of my idea of likelihood:
  • ",user," -> ",users," ?
  • Can you browse the share by any other mechanism? -- e.g. smb4k or "smb:"
  • How about removing the "credentials=..." temporarily?
  • Could in be a problem on the M$ side?
  • Might a "umask" help?

titopoquito 05-14-2007 12:35 PM

And to add some more thoughts: I noticed that you write "e$" for the share name. When I watched the shares on a Windows machine some time ago with krusader, it showed two entries for each one share. If I remember it right it didn't work for me to put the $ at the end. Maybe try with just "e" instead of "e$"?

Matir 05-14-2007 03:43 PM

Is mount.cifs chmod +s? I.e., is the setuid bit set? If not, no user could ever mount with it.


All times are GMT -5. The time now is 08:44 AM.