LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-31-2005, 10:02 AM   #1
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
mount smb drives as non-root user?


I have a Windows XP laptop on which I have some shares which I access from my Linux desktop machine. At the moment I'm unable to mount the shares as any other user than root.

First, a bit of background. I've got the following mount-point defined in /etc/fstab:

Code:
//cchqdave/c$     /mnt/laptop             smbfs   user,credentials=/home/david/.smbpasswd,rw,noauto       0 0
If I try to mount this mount-point as myself (an unprivileged user), I get an error:

Code:
[david@malvern ~]$ mount /mnt/laptop
smbmnt must be installed suid root for direct user mounts (501,501)
smbmnt failed: 1
So I took the suggestion and made smbmount setuid root:

Code:
[david@malvern ~]$ sudo chmod u+s `which smbmount`
And tried mounting it again:

Code:
[david@malvern ~]$ mount /mnt/laptop
libsmb based programs must *NOT* be setuid root.
12687: Connection to cchqdave failed
SMB connection failed
Which is weird. Anyone got any suggestions? I really don't want to have to do sudo mount /mnt/laptop every time. It's probably worth mentioning if I do do sudo mount /mnt/laptop then it works fine and I can access my shares without any problems - I just don't like having to stick in the sudo password every time because it's a pain.
 
Old 08-01-2005, 08:28 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Um ... this is not how FC4 expects you to use smb shares ...

You can set up the FC4 machine as the server - set the workgroup etc - and the share appears in your XP laptop. The whole thing works through the gui.
 
Old 08-01-2005, 10:31 PM   #3
TexasDex
Member
 
Registered: Feb 2003
Location: The Attic. Nowhere near Texas.
Distribution: Gentoo, Kubuntu, formerly LFS, SuSE, and RedHat
Posts: 133

Rep: Reputation: 15
Well there are two binaries, smbmnt and smbmount. It says smbmnt should have suid, but you made smbmount suid.

I don't know what the difference is, but I know there is a difference. Try to set the suid bit for smbmnt instead of smbmount, and call us in the morning.
 
Old 11-27-2005, 09:08 AM   #4
dutch1918
Member
 
Registered: May 2004
Location: Big Sky Country
Distribution: Suse 9.3
Posts: 34

Rep: Reputation: 15
Why not use PAM_MOUNT. Alot better and secure then using fstab or smbfstab
 
Old 09-05-2007, 05:28 AM   #5
o2bfishn
Member
 
Registered: Dec 2005
Location: Kannapolis, NC USA
Distribution: learning ubuntu
Posts: 46

Rep: Reputation: 15
i know this thread is way old but the original poster never replied to say if it was fixed or not, but i did what TexasDex mentioned and did
Code:
chmod u+s /usr/bin/smbmnt
and the mount worked fine in my fstab. i had the same setup as the OP and could not get the share mounted or if i did, i didnt have write access. now i do!

thanks
 
Old 09-05-2007, 07:38 AM   #6
ElvisImprsntr
Member
 
Registered: Aug 2007
Location: Florida
Posts: 33

Rep: Reputation: 19
I solved a similar problem differently

http://www.linuxquestions.org/questi...d.php?t=581128
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
smb mount folders disappear on mount & konqueror smb fails: network unreachable tisource Linux - Networking 1 10-17-2007 12:30 AM
Mount SMB Share from user account jeopardyracing Linux - Newbie 3 12-03-2004 05:04 PM
can't mount smb share as non-root user nixinbarrie Linux - Networking 5 09-27-2004 08:51 PM
Give user permission to mount/use cdrom drives or usb drives zwyrbla Linux - Newbie 2 08-23-2004 04:30 PM
mount drives from user instead of root gonavy Linux - Newbie 2 11-29-2003 08:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:42 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration