Using setuid on smbd
henke at mac.se
Thu Jul 12 20:48:53 GMT 2007
12 jul 2007 kl. 17:08 skrev simo:
> On Thu, 2007-07-12 at 15:30 +0200, Henrik Zagerholm wrote:
>> Hello list,
>> I wonder if it is a really bad idea to setuid bit on samba daemons to
>> make them start with root privileges?
>> I need it in an embedded systems where the daemons are started by a
>> non root user and I don't have access to sudo etc and we all know
>> that smbd should run under root.
> Make a simple setuid helper in C that take care of starting the
> should be a few lines of code.
Ahh maybe something like this
setuid( 0 );
setgid( 0 );
execv( "/usr/samba/sbin/smbd", argv );
Then set setuid bit on my little C program. Correct?
> Simo Sorce
> Samba Team GPL Compliance Officer
> email: idra at samba.org
More information about the samba-technical