LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-08-2004, 08:23 AM   #1
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Rep: Reputation: 30
Question Mounting samba drive as user...


Hi,

I'm on Slackware 9.1 and was trying smb4k when I noticed that you can't mount a network drive as a regular user...
So does anyone know how to make changes (some permissions I suspect) so it becomes possible to run smbmount as user?

Greetz 'n tnx,
elluva
 
Old 01-08-2004, 08:48 AM   #2
Noerr
Member
 
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696

Rep: Reputation: 30
you need setuid to mount and smbmount
but smbmount usually works fine with users, but you need to specify correct creditentials like

mount -t smbfs //winpc/myshare /mnt/somedir -o username=YourName, password=YourPass
 
Old 01-08-2004, 11:45 AM   #3
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Original Poster
Rep: Reputation: 30
nope I get:
smbmnt must be installed suid root for direct user mounts (501,501)
smbmnt failed: 1


any idea
 
Old 01-08-2004, 12:25 PM   #4
thebell
LQ Newbie
 
Registered: Dec 2003
Distribution: Gentoo
Posts: 25

Rep: Reputation: 15
If you want smbmount to work for a normal user, install it suid root. In general, you need root privileges to mount/unmount filesystems, for obvious reasons, so the simple solution is to make smbmount run with root privileges. Type the following as root:

# chmod a+s `which smbmount`
 
Old 01-09-2004, 01:11 AM   #5
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Original Poster
Rep: Reputation: 30
$> smbmount //HOST/SHARE /mnt/share/ -o username=xxxxxx
libsmb based programs must *NOT* be setuid root.
1093: Connection to HOST failed
SMB connection failed

same command as root does work...
 
Old 01-10-2004, 02:29 AM   #6
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Original Poster
Rep: Reputation: 30
I found the problem, for some reason, it is not smbmount that must be setuid, it is smbmnt. I had to see it right away in the error message, but didn't...

still thanks for all help!
 
Old 05-24-2004, 10:51 PM   #7
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Debian, Android
Posts: 1,819

Rep: Reputation: 46
ellava, could you post what you did to make this work so others can benefit from your experience. I did chmod a+s `which smbmnt` and still get the error saying libsmb based apps should NEVER be suid root.
 
Old 05-25-2004, 08:55 AM   #8
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Original Poster
Rep: Reputation: 30
Post how I solved it??? Well it is there isn't it. Euhm... well doing chmod a+s `which smbmnt` solved it for me. The thing I was doing wrong was that I didn't do chmod a+s `which smbmnt` but did chmod a+s `which smbmount`.

hope it helps although I posted this before on this thread
 
Old 05-25-2004, 08:35 PM   #9
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Debian, Android
Posts: 1,819

Rep: Reputation: 46
Sorry, I thought you had done more while off-line to solve the problem. I was having a similar issue until I added a line in fstab for the share I was after.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting a drive as my user Avatar33 Linux - General 6 10-06-2005 01:01 AM
Mounting Samba Shares ad user hobz Linux - Software 1 06-17-2005 10:10 PM
Mounting drive through Samba coolfrog Linux - General 1 02-27-2005 09:37 AM
Mounting network drive with samba. Valhalla Linux - Networking 4 02-23-2005 03:54 PM
Mounting a Samba Drive defubar Linux - Networking 3 02-11-2004 06:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:39 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