GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Login attempt notification
Operating System - HP-UX
1855375
Members
2538
Online
104110
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-1999 04:00 AM
11-08-1999 04:00 AM
Login attempt notification
I am trying to write a script that will notify me if there has been a failed
login attempt. Just a simple look at /var/adm/btmp time stamp every few minutes
and send me mail or open a window telling me of the failed login.
login attempt. Just a simple look at /var/adm/btmp time stamp every few minutes
and send me mail or open a window telling me of the failed login.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-1999 05:01 AM
11-08-1999 05:01 AM
Re: Login attempt notification
This is hardly refined, but you should be able t adapt the logic to your needs:
#!/bin/ksh
THEN=`ll /var/adm/btmp|awk '{printf("%s %s %s",$6,$7,$8)}'`
while [ true ]
do
NOW=`ll /var/adm/btmp|awk '{printf("%s %s %s",$6,$7,$8)}'`
if [ "$THEN" != "$NOW" ]
then
THEN=$NOW
elm -s "Bad login on `hostname`" user@domain < Bad login recorded at $NOW
END
fi
sleep 120
done
#!/bin/ksh
THEN=`ll /var/adm/btmp|awk '{printf("%s %s %s",$6,$7,$8)}'`
while [ true ]
do
NOW=`ll /var/adm/btmp|awk '{printf("%s %s %s",$6,$7,$8)}'`
if [ "$THEN" != "$NOW" ]
then
THEN=$NOW
elm -s "Bad login on `hostname`" user@domain <
END
fi
sleep 120
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-1999 10:09 PM
11-08-1999 10:09 PM
Re: Login attempt notification
Alan,
Thanks for your help, it was exactly what I was looking for. Now I can tell
when security scans my systems for vulnerabilities.
Out of all the newsgroups and conferences I use daily, this one has been the
most helpful. Good job HP.
Bruce
Thanks for your help, it was exactly what I was looking for. Now I can tell
when security scans my systems for vulnerabilities.
Out of all the newsgroups and conferences I use daily, this one has been the
most helpful. Good job HP.
Bruce
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP