Home

Debian/Ubuntu Tips & Tricks

Debuntu.org: .deb packages, Unix/Linux Tutorials and Articles.

User login

Get Firefox


Tips


How-To smbfs: smbmnt must be installed suid root

Quite often, when using program such as smb4k, I encountered the following error:

smbmnt must be installed suid root for direct user mounts

This happens because some linux distribution does not configure smbfs properly such as a normal user can mount samba files.

This how-to will show how to simply resolve this issue.

smb4k, a QT base samba client uses smbfs in order to mount the remote samba shares under a normal user home directory. If smbmnt and smbumount are not set uid root, smb4k will fail mounting the remote directory.

The message is explicit enough, you need to set uid root those files. Here is what you need to type in a console to resolve this:

$ sudo chmod u+s `which smbmnt`

in order to be able to mount the shared directory , and:

$ sudo chmod u+s `which smbumount`

in order to be able to umount the shared directory.

That's it, you can now mount and use the remote files as a normal user, and use those files like if there were on your local disk.


It dosn't work with my

It dosn't work with my Ubuntu 6.10. I tried following command:

sudo chmod u+s /usr/bin/smbmount /usr/bin/smbmnt /usr/bin/smbumount

If I try to mount a Samba-Share I get this error:
libsmb based programs must *NOT* be setuid root.
7246: Connection to 192.168.1.22 failed
SMB connection failed


You have to do $ chmod +s

You have to do

$ chmod +s /usr/bin/smbmnt

Not /usr/bin/smbmount!

There is an excellent tutorial (in Dutch) about the problem, but you should be able to help yourself using the commands:

http://www.sjoerd-visser.demon.nl/net-linux/samba.html#Shares%20mounten%20met%20smbmount


Solution

Try this:
chmod -s /usr/bin/smbmount


Finally I have found the

Finally I have found the solution by my self.
You have unset the userid on smbmount

sudo chmod u-s /usr/bin/smbmount


smbmount should not be setuid root

Hi Fahne,
Actually, the tutorial did not say anything about:

$sudo chmod u+s /usr/bin/smbmount

undoing this will fix your problem.

$sudo chmod u-s /usr/bin/smbmount

Debuntu


Thanks for your reply! This

Thanks for your reply!
This was from another tutorial, after I've unset the suid, mounting works fine!


smb4k mount

Please, I don't get it.
With smb4k I get the above message.
when I try for example:
(server = woutie3000, share = mp3)
sudo chmod u+s ... what comes next? //woutie3000/mp3 doensn't work...

Please let me know, I will be very glad with your answer.


smbmnt

I've done it already :)
Sorry to bother you people.
It's the folder: /usr/bin/smbmnt (with my ubuntu linux version).

Thanks anyway ;)

Greetz, woutie


Nice to see you worked it

Nice to see you worked it out.

cheerio
Debuntu


thanks !

thanks !