- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- last login displayed in numbers
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
тАО06-20-2001 10:57 AM
тАО06-20-2001 10:57 AM
last login displayed in numbers
I am running HPUX 11 and am writing a script to delete users - one of the checks I would like to do is to ensure the user has not logged on in over 14 days. Without using Perl, does anyone have a simple method.
Thanks
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2001 11:45 AM
тАО06-20-2001 11:45 AM
Re: last login displayed in numbers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2001 11:48 AM
тАО06-20-2001 11:48 AM
Re: last login displayed in numbers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2001 12:07 PM
тАО06-20-2001 12:07 PM
Re: last login displayed in numbers
You might consider using:
# last -1
where
The 'last' will return the single most recent logon (if any) for the user. You could convert the date in month-name and day format to a simple numeric value representing the day-offset of the current year and compare for an equal or greater than 14-day difference.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2001 03:02 PM
тАО06-20-2001 03:02 PM
Re: last login displayed in numbers
One thing to note is to make sure that
when you write your script check to
make sure that your /var/adm/wtmp file
carries the information for the full
14 days.
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2001 01:04 AM
тАО06-21-2001 01:04 AM
Re: last login displayed in numbers
James - I got as far as the last -1 but thought there might be a simpler way to obtain a number value rather than write a small script to convert. No problem
Thanks for the help
-M