login
Header Space

 
 

How to get effective user id from proc file system

October 29, 2007 - 7:16am
Submitted by Anonymous on October 29, 2007 - 7:16am.
Linux

Hello all,

Can anybody tell me if there is any way to get effective user
id from the proc filesystem. I searched all the files but could not
get.

Thanks in advance for your help.

-Rucha

I guess you didn't look very

October 29, 2007 - 7:39am
Anonymous (not verified)

I guess you didn't look very hard then. Give it another try, and you might find something.

okay someone is learning an

February 4, 2008 - 10:08am
Anonymous (not verified)

okay someone is learning an you posted a result that told them to keep looking... well i'm learning too and I pose the same question. Now if you would of answered the question to begin with, then I would have the answer as well.

"learning"

February 4, 2008 - 6:42pm

this one was really easy to find, if you know how to search. learners should not learn static information but should learn how to find what they want on their own. this is especially important for programmers, because there is no manual and no forum that will tell you where to find the bug in your 1000 line program, you will have to do the bug hunting yourself. searching for easily detectable information in a limited set of lines is a good way to learn that. then consult the source file where this information is generated to verify your findings. if you don't want to do this, at least do "man proc" or read about proc in the files in linux/Documentation/.

To get the effective uid for

February 4, 2008 - 4:26pm

To get the effective uid for a given process (let's say pid 2345), you can look at the file "/proc/2345/status". Under uid it will show four different ones. I believe , effective uid is the 2nd from the left side.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary