LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 05-12-2007, 07:57 PM   #1
SlowCoder
Member
 
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: 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?

Last edited by SlowCoder; 05-12-2007 at 08:01 PM.
 
Old 05-13-2007, 05:08 PM   #2
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Ruhr Area, Germany
Distribution: Slackware64 14.0
Posts: 1,517

Rep: Reputation: 90
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
 
Old 05-14-2007, 10:53 AM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 230Reputation: 230Reputation: 230
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
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Ruhr Area, Germany
Distribution: Slackware64 14.0
Posts: 1,517

Rep: Reputation: 90
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
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

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


Reply


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


All times are GMT -5. The time now is 01:50 PM.

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