Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script to find all users currently logged on?

Status
Not open for further replies.

yy3

Technical User
Nov 7, 2006
2
GB
Hi Everybody?

I am creating a script which will allow me to find all users currently logged on to the system and also display the process they are runing. I want the heading for each user to be their real name not their log in name. the users must not be displayed more than once.

Kindly help out.

yy3
 
A starting place would be the existing commands
who -uH
finger <Name>
ps -ef | grep <PID>

Please post back what you have tried so far.

I hope that helps.

Mike
 
Also look into utmp and wtmp. I know they exist on linux, not sure about other unix flavors. Connections are logged into these.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top