Hi,
I am writing a script, and I need to incorporate some logic where I can find out the unix username of the person who is executing the script.
The issue is , a particular user could have "sesu" ed into a group id. for eg. root, and then executed the script. In that case, instead of root, the unix username would be desired eg. abc123
I tried echoing $USER , and then grepping it from /etc/groups. But for a group id there are N different users, and I cant pinpoint to the single user who executed the script.
Not sure how to proceed from here. Any pointers?
I am on AIX 5.3
Neil