[Samba] When is smbd running as root, and when as a mortal?

Gerald Carter jerry at samba.org
Mon Mar 18 08:50:05 GMT 2002


On 5 Mar 2002 ard at waikato.ac.nz wrote:

> 
> Out of the 150 smbd processes on my server at the moment, 137 are
> running as root and 13 as the connecting user.  "smbstatus" and utmp
> give all the right info but it would be nice if "ps" agreed.
> 
> Out of curiosity, when does smbd run as root and when does it run as its
> connecting user?

Short answer is that that smbd swaps to the user uid when 
servicing an smb command that requires it.  See the 
smb_messages[256] array in smbd/process.c.  Otherwise it runs as root.













cheers, jerry
 ---------------------------------------------------------------------
 Hewlett-Packard                                     http://www.hp.com
 SAMBA Team                                       http://www.samba.org
 --                                            http://www.plainjoe.org
 "Sam's Teach Yourself Samba in 24 Hours" 2ed.      ISBN 0-672-32269-2
 --"I never saved anything for the swim back." Ethan Hawk in Gattaca--





More information about the samba mailing list