- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: getprpw -m slogint & ssh logins
Operating System - HP-UX
1752805
Members
5373
Online
108789
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
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
03-04-2006 06:14 PM
03-04-2006 06:14 PM
I need to find out the successful last login time for the user accounts on a trusted HP-UX server. Within a simple script I use:
getprpw -m slogint
This reports correctly for all logins done through "telnet" but does not consider any logins done through "ssh".
For eg. a user has logged in through ssh yesterday but that entry is not shown. Instead the last time he logged in to the system about a month back is reflected. Any successful logins through ssh to the system is not being shown in last successful login listing. This is happening for all relevant user accounts on multiple servers.
Note: i do no want to use "last", as i would use the output data for users who have logged in months before too.
Looking forward to suggestions from you how I may get this right.
Thanks in anticipation.
-Shouvik
getprpw -m slogint
This reports correctly for all logins done through "telnet" but does not consider any logins done through "ssh".
For eg. a user has logged in through ssh yesterday but that entry is not shown. Instead the last time he logged in to the system about a month back is reflected. Any successful logins through ssh to the system is not being shown in last successful login listing. This is happening for all relevant user accounts on multiple servers.
Note: i do no want to use "last", as i would use the output data for users who have logged in months before too.
Looking forward to suggestions from you how I may get this right.
Thanks in anticipation.
-Shouvik
Think, think and think...before you jump
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2006 11:12 AM
03-05-2006 11:12 AM
Solution
This appears to be a difficulty with SSH which uses PAM for authentication. This problem also affects auditing. The suggested workaround is last (wtmp) or setup HIDS (host Intruder Detection Software at http://www.docs.hp.com/en/internet.html#Host%20Intrusion%20Detection%20System)
The wtmp file does contain a complete date for each login/logout (MM/DD/YY) but the last program apparently does not pay any attention to the year, thus leading to 'ghost' logins. This is a defect in last, not the wtmp file so you can use the wtmp decoder program fwtmp as in:
cat /var/adm/wtmp | /usr/sbin/acct/fwtmp > myfile
Now you can find the last login for a given user regardless of the size of wtmp.
Bill Hassell, sysadmin
The wtmp file does contain a complete date for each login/logout (MM/DD/YY) but the last program apparently does not pay any attention to the year, thus leading to 'ghost' logins. This is a defect in last, not the wtmp file so you can use the wtmp decoder program fwtmp as in:
cat /var/adm/wtmp | /usr/sbin/acct/fwtmp > myfile
Now you can find the last login for a given user regardless of the size of wtmp.
Bill Hassell, sysadmin
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