A few questions...
M. Warner Losh
imp at bsdimp.com
Fri Jul 27 22:22:55 UTC 2007
In message: <200707232052.58485.dmw at unete.cl>
Daniel Molina Wegener <dmw at unete.cl> writes:
:
: Hello,
:
: I need information about few things, I hope someone can help
: me and thanks in advance.
:
: a) Is there any function or variable that tells me which is the
: root user UID in the system, or root always have 0 and it's
: an "elegant" option to compare the variables or structure
: members against zero.
The super user is always UID == 0. By definition.
The root account typically is 0, but doesn't have to be.
User accounts typically aren't 0, but can be (cf toor).
Any account with a uid of 0 is a super user.
It is the super user that gets all the toys.
: b) Can normal users look for system processes or kernel threads?
Sometimes. See the sysctls security.bsd.see_other_gids and
security.bsd.see_other_uids.
: c) Can root look for system processes or kernel threads?
If it is the super user, yes.
Warner
More information about the freebsd-hackers
mailing list