- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Check user password expiry information !
Operating System - Linux
1820096
Members
3588
Online
109608
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
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
тАО01-18-2004 02:03 PM
тАО01-18-2004 02:03 PM
Check user password expiry information !
Hi all,
I would like to create a script to collect all the user accounts with their password expiry date.
This script will be executed on daily basis and generate a report for administrator to inform related account owners to login and change their password accordingly.
From my understanding. The expiry date in Unix is in terms of seconds and has a baseline set to 1-Jan-1970. We need to take care for the maximum password life password policy as well.
Any idea to creat the script ? Appreciated it if you could give me some samples.
Best Regards,
Chris,
I would like to create a script to collect all the user accounts with their password expiry date.
This script will be executed on daily basis and generate a report for administrator to inform related account owners to login and change their password accordingly.
From my understanding. The expiry date in Unix is in terms of seconds and has a baseline set to 1-Jan-1970. We need to take care for the maximum password life password policy as well.
Any idea to creat the script ? Appreciated it if you could give me some samples.
Best Regards,
Chris,
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2004 02:53 PM
тАО01-18-2004 02:53 PM
Re: Check user password expiry information !
-S This will output a short information about the status of the
password for a given account. Available to root user only.
From the man page
passwd -S username
You may want to use it in combination with other options.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2004 07:02 PM
тАО01-18-2004 07:02 PM
Re: Check user password expiry information !
As Stevens says, passwd -S gives you the information you need for each user. The first part indicates if the user account is locked (L), has no password (NP), or has a usable password (P). The second part gives the date of the last password change. The next four parts are the minimum age, maximum age, warning period, and inactivity period for the password.
Maybe could you loop a script searching for each number above 500 (if your user accounting starts from 500), and just calculating max age - last change and piping it to a .txt if it's less than the value you want...
Would it suit your needs ?
J
Maybe could you loop a script searching for each number above 500 (if your user accounting starts from 500), and just calculating max age - last change and piping it to a .txt if it's less than the value you want...
Would it suit your needs ?
J
You can lean only on what resists you...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 01:06 PM
тАО01-20-2004 01:06 PM
Re: Check user password expiry information !
Hi there,
Thanks for the inputs !!
Cheers,
Chris,
Thanks for the inputs !!
Cheers,
Chris,
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
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP