su command question

Derek Broughton news at
Sat Jul 5 17:42:55 UTC 2008

Alan Milnes wrote:

> Smoot Carl-Mitchell wrote:
>> On Sat, 2008-07-05 at 13:51 +0100, Alan Milnes wrote:
>>> In the end both ways work, both ways run it with root privileges, I
>>> think my way is cleaner but this is Linux there's always more than one
>>> option.
>> No, my example runs it with the privileges of the user "ventrilo" which
>> is quite different than running the command with root privileges.
> Are you sure - the su is telling it to run with root privileges isn't
> it? Maybe it's my RHEL background where scripts to start services etc
> are normally programmatically run as root rather than as a user invoking
> su privileges.

No, any method of "su" or "sudo" specifying a user name uses the privilege
of that user.  It seems unlikely to me that RHEL has service scripts
running "as" root.  They tend to get started _by_ root, but drop privilege. 
A quick look at ps should show you that most processes are not actually
running _as_ root.

More information about the ubuntu-users mailing list