The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How do I establish a remote CDE or JDS session on Solaris 10? ultra0384 SUN Solaris 11 10-05-2006 02:23 PM
sqlplus session being able to see unix variables session within a script 435 Gavea Shell Programming and Scripting 2 07-03-2006 07:11 AM
mac 10.4>terminal>linux remote server>ssh login accepted>session closed-why? xprankard UNIX for Dummies Questions & Answers 0 01-21-2006 07:09 AM
Remote Dial-up Modem Printing With Out Cpu On The Remote Side! jayvee SUN Solaris 0 08-23-2005 05:23 AM
remote x session to a server box w/no IO SnakeO UNIX for Dummies Questions & Answers 2 03-13-2005 06:46 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-25-2008
raidzero's Avatar
Registered User
 

Join Date: Jun 2008
Posts: 54
how to run who am i from remote session

I just moved from AIX 4 to AIX 5.3. the command `who am i` is essential to our logon scripts; but it does not work anymore, it says the process is not attached to a terminal. Is it possible to run this command remotely? It works for remote root sessions. If it is not is there another way to accurately determine the IP address the remote session is currently using? Thanks
Reply With Quote
Forum Sponsor
  #2  
Old 08-25-2008
raidzero's Avatar
Registered User
 

Join Date: Jun 2008
Posts: 54
I solved my own problem, found out $$ is the PID of the current sesison, so instead of
Code:
who am i | awk '{print$6}'
I simply did
Code:
who -u | grep $$ | awk '{print$8}'
works great and everything is rolling along as it should again.
Reply With Quote
  #3  
Old 08-25-2008
broli's Avatar
Registered User
 

Join Date: Dec 2007
Location: Argentina
Posts: 198
have you tried
whoami ?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0