su ?? Who logged in First ??

Hi all,

Say my login user id is "t007" and I login into the unix server first using my id and password and then I used to use "su" command to switch the user using root user id and password. Now, how the third person will come to know who has logged in as a first user ?

As:

Login: t007
password: abcd

$ su - mqsiadm
password : qwert123

$$ [now I am as user "mqsiadm"]
$$ [How the third person will come to know who logged in first ? (i.e. t007)]

Now if I'll exit, I'll first comeout as a "mqsiadm" and then i'll be as "t007".

Please give me the solution to this !!

Thanks in advance !!:b:

I am not sure if I understand it correctly. If so, then:

  1. You could try to trace what is your parent process and this way you could probably get this
  2. Probably all the users will be assigned to the same console - try ps'ing with a full list and then checking what consoles are assigned to the user.
  3. I am not sure about that but probably you could try to check if the real-uid and effective-uid are set to the given user IDs.

Hey,

Yup , thanks man, parent process id will work. I had an idea about that but when i tried it was not working. Now I got the solution. Just, I had to dig more.

Thanks anyways.:b: