-   Linux - Networking (
-   -   Mounting samba drive as user... (

elluva 01-08-2004 08:23 AM

Mounting samba drive as user...

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,

Noerr 01-08-2004 08:48 AM

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

elluva 01-08-2004 11:45 AM

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

any idea

thebell 01-08-2004 12:25 PM

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`

elluva 01-09-2004 01:11 AM

$> 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...

elluva 01-10-2004 02:29 AM

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!

Pcghost 05-24-2004 10:51 PM

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.

elluva 05-25-2004 08:55 AM

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

Pcghost 05-25-2004 08:35 PM

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.

All times are GMT -5. The time now is 03:44 PM.