Limit logins to 1

Trying to limit 1 login per account...

Setup:

We have 2 auth logins, one to the AIX (telnet)then into a distribution mgmt software, the users do not have a shell to log into on the AIX itself, so placing a script such as:

active=`who | awk '{printf",%s,\n",$1}' | grep ,$LOGNAME, | wc -l`

into the .profile wont work, as there is no home directory and no shell execution...

How else can I accomplish this so that the users are limted to 1 login per account...

Added script into /etc/profile rather than homedir profilkes and it worked...

Thanks all...