This link may help you alot:
http://www.redhat.com/docs/manuals/e...al/step-guide/
For example, creating a user account is discussed in section 1.6
This manual may also be very helpful:
http://web.mit.edu/rhel-doc/3/rhel-sag-en-3/index.html
I believe you can give a user account superuser authority by changing the groups to which that account belongs, as is discussed in section 35.2 in the above manual. I don't know how to do it through a c code, sorry.
In this document:
http://people.redhat.com/drepper/defprogramming.pdf
setuiud is discussed in section 2.3.4 I think (you can view the table of contents)
This link looks helpful in the creation and management of users:
http://web.mit.edu/rhel-doc/4/RH-DOC...rs-groups.html
It is part of a larger document you can navigate by going 'up' in the link hierarchy. i think it is part of the same user manual for RHEL 4.
The ausearch command seems to give the euid and egid of processes
http://www.redhatmagazine.com/2007/0...prise-linux-5/
It looks like that within c, stat() can be used to get ctime, which is sometimes referred to as creation time (see warning in the page, however)
http://unix.derkeiler.com/Newsgroups...3-12/0692.html
I hope this helps get you started. I know very little about the things you asked, but was able to find relevant material simply by doing google searches.