[Samba] Mounting for non-root users

Heiko Wundram heikowu at ceosg.de
Wed Oct 22 07:14:55 GMT 2003

Leon Stringer wrote:

>This has been asked before but the answers haven't worked for me.I upgraded from 2.2.7 to 3.0.0. I used to connect to Windows sharesusing smbmnt in .bash_profile as a non-root user having chmod 4755smbmnt. Now this doesn't work:	- smbmount won't let non-root users run it (even after a chmod)	- smbmnt says "Failed to find real path for mount point"	- mount -t smbfs says "only root can do that".1. For Samba 3.0.0 what is the correct way for non-root users to mountWindows shares? (Which command? Is any chmod
What about sudo? chmod 4755 is not really a secure way to allow users 
access to commands which have to be run as root, unless you are the only 
person working on this machine, and you are sure that no other person 
might actually login on your machine.

sudo basically is a remedy for this. It allows a non-root user to 
execute commands as root if special premises are met (you can configure 
sudo to only allow certain commands to be run as a specific user, in 
this case you would configure sudo to allow smbmount with any number of 
parameters for your login).

I personally use sudo for all the admin tasks I need to make available 
to users on my boxes (well, all my boxes have several users which can 
login, so security is a concern for me).

If RedHat doesn't come with sudo preinstalled, install it using the rpm 
frontend RedHat provides (don't know too well about RedHat). Then do a 
man sudo to have a look at the config file syntax.



More information about the samba mailing list