HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: root login
Operating System - HP-UX
1833774
Members
2903
Online
110063
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
Forums
Discussions
Discussions
Discussions
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
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
02-07-2000 03:27 AM
02-07-2000 03:27 AM
root login
I would like to configure a script likely, that will email me when someone has
tried to logon as root and failed.
Thanks,
Nickd
tried to logon as root and failed.
Thanks,
Nickd
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2000 05:26 AM
02-07-2000 05:26 AM
Re: root login
Hi Nick,
All bad logins are stored in the /var/adm/btmp in a binary format. To show
these in a readable format, you use the lastb command (similar to the last
command for successful logins).
For example:
fred:/var/adm # lastb
asdf pts/0 Tue Feb 8 07:58
asdf pts/0 Tue Feb 8 07:58
root pts/0 Tue Feb 8 07:58
root pts/tc Fri Feb 4 15:05
root pts/tc Fri Feb 4 15:05
As far as scripting it goes, it depends on how quickly you want to get this
information. To be honest, I can't think of an easy way to trigger this
instantly.
What you can do though is schedule a cron job to check if the btmp file has
changed and display the last records since changing. Or, if you don't want the
info in it you can empty the file each time and just do a lastb to show
everything in it. This will also help maintain the size of the file.
You could set this to run every minute, or once a day to produce a report each
morning.
You may also want to look at the security and auditing options available
through SAM. If you are running a trusted system (C2 level security) then you
can do more in terms of auditing.
Hope this helps...
Cheers,
Andrew Schafer
Australian Response Centre
All bad logins are stored in the /var/adm/btmp in a binary format. To show
these in a readable format, you use the lastb command (similar to the last
command for successful logins).
For example:
fred:/var/adm # lastb
asdf pts/0 Tue Feb 8 07:58
asdf pts/0 Tue Feb 8 07:58
root pts/0 Tue Feb 8 07:58
root pts/tc Fri Feb 4 15:05
root pts/tc Fri Feb 4 15:05
As far as scripting it goes, it depends on how quickly you want to get this
information. To be honest, I can't think of an easy way to trigger this
instantly.
What you can do though is schedule a cron job to check if the btmp file has
changed and display the last records since changing. Or, if you don't want the
info in it you can empty the file each time and just do a lastb to show
everything in it. This will also help maintain the size of the file.
You could set this to run every minute, or once a day to produce a report each
morning.
You may also want to look at the security and auditing options available
through SAM. If you are running a trusted system (C2 level security) then you
can do more in terms of auditing.
Hope this helps...
Cheers,
Andrew Schafer
Australian Response Centre
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2000 01:23 PM
02-07-2000 01:23 PM
Re: root login
Probably a good idea is to disable root login from anything other than the
console via /etc/securetty then you can monitor the sulog by doing something
like this from a cron job
grep " - " /var/adm/sulog | grep -i root | mail username
This will give you all bad su attempts, change the - to a + for all the good
attempts.
console via /etc/securetty then you can monitor the sulog by doing something
like this from a cron job
grep " - " /var/adm/sulog | grep -i root | mail username
This will give you all bad su attempts, change the - to a + for all the good
attempts.
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 2025 Hewlett Packard Enterprise Development LP