I am migrating from 5.2 to 5.3 AIX. In previous versions of AIX, including 5.2, I've been able to limit user's logins to 1 by using the following script named Block_user:
#!/bin/ksh
USER=$1
NUM=`who | grep $USER | cut -c1-8 | wc -l`
#The above ' is not a single quote but back quote
if [[ $NUM -lt 1 ]]
then
exit 0
fi
echo "permission denied...$NUM is the limit of logins"
exit 1
and changing the following
/usr/lib/security/methods.cfg - add:
auth_method
program = /usr/bin/Block_user
and
/etc/security/user, changing the default stanza to read
auth1 = SYSTEM,auth_method
This doesn't work in 5.3. The user tries to login and receives "Invaild user or password". Removing the auth_method from /etc/security/user allows the person to login. I've spoken with IBM and so far no one has an answer as to why it will not work. I'm hoping someone out here does?