Problem with running custom authentication script



This was working successfully in AIX 4.3.1.0. After upgrading the
machine and OS to AIX 5.2.0.0, the custom authentication failed.

I used the following entries and script:


/etc/security/login.cfg :
auth_method:
program = /usr/bin/user_limit.scp


/etc/security/user ("default" section):
auth1 = SYSTEM,auth_method


#/usr/bin/user_limit.scp
#!/bin/ksh
USER=$1
LOGNUM=`cat /logins.dat | grep $USER | awk '{print $2}'`

if [[ $LOGNUM = '' ]]
then
LOGNUM=1
fi

NUM=`who | grep -w -c $USER`

if [[ $NUM -lt $LOGNUM ]]
then
exit 0
fi
echo "permission denied ... you already have $NUM login(s) for" $USER
"."
exit 255


Problem:
After entering the user name and password, the following error is
shown. If I comment out the lines in the login.cfg and user files, I
can login successfully.

AIX Version 5
(C) Copyrights by IBM and by others 1982, 2005.
login: root
root's Password:
3004-007 You entered an invalid login name or password.
login:


Thanks in advance for your help.

Jack

.



Relevant Pages

  • Re: AIX script to process D3 login
    ... I just tell my users to logoff with exit and haven't had any problems since. ... AIX version 5 on RS6000 ... Remote login using Cisco VPN and Accuterm telnet. ...
    (comp.databases.pick)
  • Re: acess CDE on AIX from linux
    ... The AIX machine is set up to accept remote xdmcp logins ... recover in case you make a mistake that hoses your graphical login. ... If your LAN has more than one host that can host a CDE session, ... local Linux apps without having to switch screens. ...
    (comp.os.linux)
  • Weakness introduced by denying remote logins on AIX, possibly others
    ... AIX 4.3.3 and AIX 5.1, ... is possible to remotely enumerate the passwords of a known AIX account. ... believed to be in the response from the login program after authentication ... Give accounts that have been restricted from remote logins strong passwords. ...
    (Security-Basics)
  • Re: AIX is slow to login on port 22 and port 23
    ... CPU TID TSLOT PID PSLOT PROC_NAME ... AIX is slow to login on port 22 and port 23 ...
    (AIX-L)
  • AIX password enumeration possible
    ... BPR personnel can neither confirm or deny this behaviour exists in any OS other than AIX of versions mentioned below. ... In the case that the correct password is provided, the response is as follows: ... believed to be in the response from the login program after authentication ... Give accounts that have been restricted from remote logins strong passwords. ...
    (Bugtraq)