Wednesday, July 09, 2008

Who's logged on when 'w' or 'who' won't work

Sometime you can't use 'w' or 'who' to see who's logged on. Some dodgy tools don't update 'wtmp' when they spawn a shell for a connecting user. Opsware is such a tool. In such cases you need to find processes with controlling terminals to see who's logged on

  • HPUX & Solaris
ps -ef | egrep 'pts/[0-9a-z]' | grep -v $$


  • AIX (less than perfect, but a start)
ps -efo pid,ppid,user,tty,args | awk '$4!="-" {print}' grep -v $$


I have not idea how to communicate with them once you find them since wall won't work :~(

No comments: