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
LASTLOG(8)                                                  System Management Commands                                                  LASTLOG(8)

NAME
lastlog - reports the most recent login of all users or of a given user SYNOPSIS
lastlog [options] DESCRIPTION
lastlog formats and prints the contents of the last login log /var/log/lastlog file. The login-name, port, and last login time will be printed. The default (no flags) causes lastlog entries to be printed, sorted by their order in /etc/passwd. OPTIONS
The options which apply to the lastlog command are: -b, --before DAYS Print only lastlog records older than DAYS. -C, --clear Clear lastlog record of a user. This option can be used only together with -u (--user)). -h, --help Display help message and exit. -R, --root CHROOT_DIR Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory. -S, --set Set lastlog record of a user to the current time. This option can be used only together with -u (--user)). -t, --time DAYS Print the lastlog records more recent than DAYS. -u, --user LOGIN|RANGE Print the lastlog record of the specified user(s). The users can be specified by a login name, a numerical user ID, or a RANGE of users. This RANGE of users can be specified with a min and max values (UID_MIN-UID_MAX), a max value (-UID_MAX), or a min value (UID_MIN-). If the user has never logged in the message ** Never logged in** will be displayed instead of the port and time. Only the entries for the current users of the system will be displayed. Other entries may exist for users that were deleted previously. NOTE
The lastlog file is a database which contains info on the last login of each user. You should not rotate it. It is a sparse file, so its size on the disk is usually much smaller than the one shown by "ls -l" (which can indicate a really big file if you have in passwd users with a high UID). You can display its real size with "ls -s". FILES
/var/log/lastlog Database times of previous user logins. CAVEATS
Large gaps in UID numbers will cause the lastlog program to run longer with no output to the screen (i.e. if in lastlog database there is no entries for users with UID between 170 and 800 lastlog will appear to hang as it processes entries with UIDs 171-799). shadow-utils 4.5 01/25/2018 LASTLOG(8)