How to see and clear failed log in attempts in HPUX 11.23 and 11.31 in shadow password system (2807 Views)
Reply
Advisor
Senthil_N
Posts: 28
Registered: ‎03-04-2013
Message 1 of 6 (2,807 Views)
Accepted Solution

How to see and clear failed log in attempts in HPUX 11.23 and 11.31 in shadow password system

Hi All,

 

I am using HPUX 11.23 and 11.31.

 

Shadow mode is configured /etc/shadow.

 

I have enabled "AUTH_MAXTRIES=3" i /etc/default/security.

 

It is working fine.

 

How can check how many failure attempts a user tried and how to clear that. 

 

Actually I am looking for a Linux command like "faillog" in hpux.

 

If there no command in hpux like faillog. Please let me know how can we do this.

Acclaimed Contributor
Dennis Handly
Posts: 25,294
Registered: ‎03-06-2006
Message 2 of 6 (2,793 Views)

Re: How to see and clear failed log in attempts in HP-UX 11.23 and 11.31 in shadow password system

root can look at all failed attempts by using lastb(1).  Either all or for specific users.

Advisor
Senthil_N
Posts: 28
Registered: ‎03-04-2013
Message 3 of 6 (2,788 Views)

Re: How to see and clear failed log in attempts in HP-UX 11.23 and 11.31 in shadow password system

Hi Dennis,

Yes we can see bad login details from lastb.

But I am asking some thing different.

For example, In linux, if you can use the command "faillog" to see max fail login attemps. and using same commnad you clear the fail login attempts. So that user can log in to the server using same password.

So I am looking for the command in HPUX for same purpose.

If there is no command in HPUX, then how we can do this.
Acclaimed Contributor
Dennis Handly
Posts: 25,294
Registered: ‎03-06-2006
Message 4 of 6 (2,773 Views)

Re: How to see and clear failed log in attempts in HP-UX 11.23 and 11.31 in shadow password system

>So I am looking for the command in HP-UX for same purpose.

Have you looked at:

passwd -s

logins

userstat

userdbget

Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 5 of 6 (2,766 Views)

Re: How to see and clear failed log in attempts in HP-UX 11.23 and 11.31 in shadow password system

With "userstat -a maxtries", you will see a list of all users that are currently locked because of too many failed login attempts, and also the current number of failed attempts for those users.

 

If you want to check the current number of failed logins for a specific user, then "userdbget -u <username> auth_failures" should give you that information.

 

The AUTH_MAXTRIES paragraph in security(4) man page says that an account that has been locked because of too many failed logins can be unlocked with:

userdbset -d -u <username> auth_failures

(That example was not quite as easy to find as I expected, as neither userdbset(1M) nor userdbget(1M) man page talk about the auth_failures attribute at all. A helpful example would have been nice, since this might be a common question in high-security environments.)

MK
Advisor
Senthil_N
Posts: 28
Registered: ‎03-04-2013
Message 6 of 6 (2,735 Views)

Re: How to see and clear failed log in attempts in HP-UX 11.23 and 11.31 in shadow password system

Hi Matti,

Thank a lot. This is what I want.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.