[ale] Access by host
Jeff Lightner
jlightner at water.com
Thu Dec 18 17:21:34 EST 2008
You can do "whoami" to get effective user and "who am i" to get real
user with IP. Unfortunately the former has no useful options but by
running both commands you should be able to get both the pieces of
information you want.
Of course if the user isn't someone that has done an su then just doing
"who am i" would be the way to go for both user and IP.
-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of
Christoper Fowler
Sent: Thursday, December 18, 2008 5:06 PM
To: ale at ale.org
Subject: [ale] Access by host
I need to write a program fired off by bash when someone logs
into a development system. This program will update a file on login
and logout.
Can anyone tell me if there is a more detailed version of 'whoami' that
will display the IP address? Another solution would be do execute
tty and then who and extract info that way.
Chris
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------
More information about the Ale
mailing list