LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 10-25-2007, 12:54 AM   #1
sanjaykhuntia
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Rep: Reputation: 0
plz reply....urgnt


hi all,
can anyone tell me how to create a user in RHEL (red hat)and give him superuser permissions thru a c code?can he access the /proc file system?

how to get euid and egid of a process with a code snippet?
also what is the process creation time?whr can i get it?any commands or system call?

plz do reply ASAP.its urgent.


sanjay
 
Old 10-25-2007, 01:54 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
please use better thread titles, and do not mark things as urgent.
 
Old 10-25-2007, 03:15 AM   #3
ehawk
Senior Member
 
Registered: Jul 2003
Posts: 1,257

Rep: Reputation: 48
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.
 
  


Reply

Tags
linux



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick Reply "post reply" button. IsaacKuo LQ Suggestions & Feedback 16 07-01-2018 02:52 PM
urgnt help needed. display problem MisterUNIVERSE Linux - Newbie 4 09-21-2005 08:07 PM
DNS not responding plz reply nitin34847 Linux - Networking 3 05-23-2004 02:36 PM
post reply & submit reply buttons annehoog LQ Suggestions & Feedback 10 01-05-2004 06:43 PM
Evolution - reply - missing own reply emanuelgreisen Linux - Software 0 01-31-2003 04:40 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration