- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Password aging and ShadowPassword
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
Forums
Discussions
Discussions
Discussions
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
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
01-13-2005 09:12 AM
01-13-2005 09:12 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2005 02:21 PM
01-13-2005 02:21 PM
Re: Password aging and ShadowPassword
-n min
-x max
passwd -n 7 -x 60 username
that sets the password for sixty day maximum and 7 day minimum
To set it for all users you need to write a little script.
cp /etc/passwd /root
cd /root
while read -r pass
do
username-$(echo $pass | awk -F: '{print $1}')
passwd -n 7 -x 60 $username
done < passwd
rm -f /root/passwd
Run it as root.
SEP
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-13-2005 05:12 PM
01-13-2005 05:12 PM
Re: Password aging and ShadowPassword
You can get more by
#man passwd
....
-n min Determine the minimum number of days, min, that must
transpire before the user can change the password.
-x max Determine the maximum number of days, max, a password
can remain unchanged. The user must enter another
password after that number of days has transpired,
known as the password expiration time.
...
EXAMPLE
Force user2 to establish a new password on the next login which will
expire in 70 days and prohibit the user from changing the password
until 7 days have transpired:
passwd -r files -f -x 70 -n 7 user2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 01:48 AM
01-14-2005 01:48 AM
Re: Password aging and ShadowPassword
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 07:53 AM
01-14-2005 07:53 AM
Re: Password aging and ShadowPassword
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 08:16 AM
01-14-2005 08:16 AM
Re: Password aging and ShadowPassword
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2005 05:37 AM
01-19-2005 05:37 AM
SolutionInstalling the ShadowPassword fileset should be sufficient, as it provides an enhanced libpam_unix that is aware of the /etc/default/security PASSWORD_* policies. That said, there are a couple of caveats:
1) Only PASSWORD_MINDAYS and PASSWORD_MAXDAYS are used when not in shadow mode as the password file has no place for the WARNDAYS
2) As others have noted, these values only take effect when changing a password that does not have existing aging policies
3) Again, due to the limitations in how the information is stored in the passwd file, the values (specified in days) are rounded to weeks.
Cheers,
--Ron