AIX; Auto clearing of 'too many invalid login attempts by user'


 
Thread Tools Search this Thread
Operating Systems AIX AIX; Auto clearing of 'too many invalid login attempts by user'
# 1  
Old 01-02-2007
Tools AIX; Auto clearing of 'too many invalid login attempts by user'

Does anyone have a good script / cron job that handles this?

I have looked in smit and see it is clearing this count with:
chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s '{userid}'

However when I looked around to find ways to automate this I have not found an easy solution.

I know that the file .../lastlog is a text file however I am not good at stanza filtering. Thus do not know who has hit the limit to pass to the chsec command.


user1:
time_last_login = 1167758143
tty_last_login = /dev/pts/2
host_last_login = joe.somewhere.com
unsuccessful_login_count = 2
time_last_unsuccessful_login = 1166659165
tty_last_unsuccessful_login = /dev/pts/4
host_last_unsuccessful_login = joe.somewhere.com

user2:
time_last_unsuccessful_login = 1166735510
tty_last_unsuccessful_login = /dev/pts/0
host_last_unsuccessful_login = jane.somewhere.com
unsuccessful_login_count = 5
time_last_login = 1166738412

any help would be great. -KJ
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Successful user login, yet system claims invalid info

I have four AIX 6.1.7.4 systems freshly built and ready for our DBAs to do their work. Of the three one runs into an odd issue while logging in as himself, using Putty with ssh protocols. He logs in successfully, but also gets the following error message: : 3004-300 You entered an invalid login... (2 Replies)
Discussion started by: Mike Brendan
2 Replies

2. Solaris

HOW to set unlimited login attempts for user in Solaris?

Hi Admins, HOW to set unlimited login attempts for user in Solaris ? And do I need to insatll any packages before doing this? Thanks. (1 Reply)
Discussion started by: manalisharmabe
1 Replies

3. AIX

User Account Login Login on your AIX server

I want to learn AIX. I would like to find someone who would be willing to give me a login to their AIX home lab server. My intent is to poke around and discover the similarities and differences of AIX compared to other *NIXs. I am a UNIX admin so I can think of what some immediate concerns may... (1 Reply)
Discussion started by: perl_in_my_shel
1 Replies

4. Solaris

Clearing Invalid Tx Word Count:

the storage connected to my solaris box had issue and fcinfo hba-port -l was shoing Tx work count error as follows Link Error Statistics: Link Failure Count: 0 Loss of Sync Count: 1 Loss of Signal Count: 1 Primitive... (1 Reply)
Discussion started by: skamal4u
1 Replies

5. Shell Programming and Scripting

auto login to Super User account

i want to write to script which will login to su account without hving user interaction.( i know Super user password) i wrote following script its also able to log into su account. but seesion gets terminates soon. what can be done ??? or is there any other solution. i don't want to use expect... (6 Replies)
Discussion started by: anup13
6 Replies

6. AIX

Invalid login attempts

How can I see the number of invalid login attempts of a user? Thanks, (9 Replies)
Discussion started by: agasamapetilon
9 Replies

7. Solaris

Number of login attempts on solaris 10

Hi, I want to sent number of login attempts ,so that after that much attempts user account should be locked on solaris 10 (2 Replies)
Discussion started by: manoj.solaris
2 Replies

8. Solaris

invalid login attempts...

I am wondering if solaris captures id's associated w/invalid login attempts? when I try to login as "test1" several (3-5) times, I do not find any userID info under "/var/adm" files: utmpx wtmpx messages lastlog Is there another location/log I should be checking? Is it necessary for... (6 Replies)
Discussion started by: mr_manny
6 Replies

9. UNIX for Dummies Questions & Answers

freebsd auto login user at boot / i'm stuck

I run freebsd 4.8 and try to find the way or 'a' way to log in a certain user i created automaticaly at pc boot. I have searched the net, the manuals, but found nothing... could anyone please get me going by showing me an example or what file(s) i need to take a look at. i am not working... (6 Replies)
Discussion started by: termiEEE
6 Replies

10. UNIX for Advanced & Expert Users

Maximum 3 login attempts

Hi, I notice in my Sun Solaris 8 sparc workstation, if I failed my login in the 5th time, I will be closed the connection from the host. I want to make 3 times. That is, if user fails to login with 3 attempts, he will be closed the connection. How to do it? Of course I am the admin of the... (2 Replies)
Discussion started by: champion
2 Replies
Login or Register to Ask a Question
UTMP(5) 						      BSD File Formats Manual							   UTMP(5)

NAME
utmp, wtmp, lastlog -- login records SYNOPSIS
#include <utmp.h> DESCRIPTION
The file <utmp.h> declares the structures used to record information about current users in the file utmp, logins and logouts in the file wtmp, and last logins in the file lastlog. The time stamps of date changes, shutdowns and reboots are also logged in the wtmp file. The wtmp file can grow rapidly on busy systems, and is normally rotated with newsyslog(8). These files must be created manually; if they do not exist, they are not created automatically. #define _PATH_UTMP "/var/run/utmp" #define _PATH_WTMP "/var/log/wtmp" #define _PATH_LASTLOG "/var/log/lastlog" #define UT_NAMESIZE 8 #define UT_LINESIZE 8 #define UT_HOSTSIZE 16 struct lastlog { time_t ll_time; char ll_line[UT_LINESIZE]; char ll_host[UT_HOSTSIZE]; }; struct utmp { char ut_line[UT_LINESIZE]; char ut_name[UT_NAMESIZE]; char ut_host[UT_HOSTSIZE]; time_t ut_time; }; Each time a user logs in, the login(1) program looks up the user's UID in the file lastlog. If it is found, the timestamp of the last time the user logged in, the terminal line and the hostname are written to the standard output, providing the login is not set quiet; see login(1). The login(1) program then records the new login time in the file lastlog. After the new lastlog record is written, the file utmp is opened and the utmp record for the user inserted. This record remains there until the user logs out at which time it is deleted (by clearing the user and host fields, and updating the timestamp field). The utmp file is used by the programs rwho(1), users(1), w(1), and who(1). Next, the login(1) program opens the file wtmp, and appends the user's utmp record. When the user logs out, a utmp record with the tty line, an updated time stamp, and cleared user and host fields is appended to the file by init(8). The wtmp file is used by the programs last(1) and ac(8). In the event of a date change, a shutdown or reboot, the following items are logged in the wtmp file. reboot shutdown A system reboot or shutdown has been initiated. The character '~' is placed in the field ut_line, and reboot or shutdown in the field ut_name (see shutdown(8) and reboot(8)). date The system time has been manually or automatically updated by date(1). The command name date is recorded in the field ut_name. In the field ut_line, the character '|' indicates the time prior to the change, and the character '{' indicates the new time. FILES
/var/run/utmp The utmp file. /var/log/wtmp The wtmp file. /var/log/lastlog The lastlog file. SEE ALSO
last(1), login(1), w(1), who(1), utmpx(5), ac(8), init(8), lastlogin(8), newsyslog(8) HISTORY
A utmp and wtmp file format appeared in Version 6 AT&T UNIX. The lastlog file format appeared in 3.0BSD. BSD
May 14, 2003 BSD