Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Login failure script for last one week

Ramasubramanian Krishna
Occasional Advisor

Login failure script for last one week

Hi

 

Looking for a script that will generate a report of unsuccessful logins for last one week for both linux and hp-ux env

3 REPLIES
Patrick Wallek
Honored Contributor

Re: Login failure script for last one week

You can see unsuccessful logins via the 'lastb' command.

Ramasubramanian Krishna
Occasional Advisor

Re: Login failure script for last one week

I needed a script to running on weekly basis and generate a failure report for that particular week only . using lastb i will be getting for the full month


Patrick Wallek wrote:

You can see unsuccessful logins via the 'lastb' command.


 

 

Highlighted
Dennis Handly
Acclaimed Contributor

Re: Login failure script for last one week

>I needed a script to running on weekly basis and generate a failure report for that particular week only . Using lastb I will be getting for the full month

 

Using lastb(1) goes back as far as the last time the EOF was reset.

So either you need to reset it once a week.  Or you need to script a check for the current week using data arithmetic.