- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Login attempt notification
Operating System - HP-UX
1753830
Members
8563
Online
108806
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP