Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-12-2007, 07:57 PM   #1
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
Can't automount CIFS as normal user

Using a tutorial found here:
I have set up my mountpoint.

My fstab entry currently is:
//$ /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:
//$ /mnt/greendata cifs    rw,noauto,user,credentials=/etc/samba/cred_green,uid=500,gid=500 0 0
Other ideas were:
//$ /mnt/greendata cifs    rw,noauto,user,credentials=/etc/samba/cred_green,uid=[username] 0 0
//$ /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:
mount error 1 = Operation not permitted
Refer to the mount.cifs(8) manual page ( mount.cifs)
So far, no luck. Help?

Last edited by SlowCoder; 05-12-2007 at 08:01 PM.
Old 05-13-2007, 05:08 PM   #2
Senior Member
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware 14.1 (32 and 64 bit)
Posts: 1,594

Rep: Reputation: 125Reputation: 125
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
//  /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"):
 %users ALL=NOPASSWD:/sbin/mount /mnt/nike/c
 %users ALL=NOPASSWD:/sbin/umount /mnt/nike/c
Hope this helps
Old 05-14-2007, 10:53 AM   #3
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
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?
Old 05-14-2007, 12:35 PM   #4
Senior Member
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware 14.1 (32 and 64 bit)
Posts: 1,594

Rep: Reputation: 125Reputation: 125
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$"?
Old 05-14-2007, 03:43 PM   #5
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
help please: mount -t smbfs -a fails as normal user, as root, doesn't mount anything thevic Linux - Networking 11 04-09-2007 03:09 AM
Mount CIFS as normal user ppr:kut Linux - Networking 6 04-05-2007 09:16 AM
Mounting CIFS as normal user abovett Linux - Networking 2 05-18-2006 04:58 PM
Mount CIFS partition as user: Invalid or missing username paco36 Linux - General 2 07-04-2005 12:31 AM
normal user can mount? vacilus Linux - Software 1 12-22-2004 11:39 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:30 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration