HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How to define password policy on Linux
Operating System - Linux
1830256
Members
2057
Online
110000
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
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
05-11-2005 05:26 AM
05-11-2005 05:26 AM
How to define the following password policy on Linux:
1. Length must be at least 6 characters
2. expire after 90 days
3. Cannot reuse previous password
4. Account is locked after 3 failed attempts. Unlocked after 15 minutes.
5. User is required to change password after first login (after servicedesk creates the account).
7. Password can not be the same as the username.
Thanks!
1. Length must be at least 6 characters
2. expire after 90 days
3. Cannot reuse previous password
4. Account is locked after 3 failed attempts. Unlocked after 15 minutes.
5. User is required to change password after first login (after servicedesk creates the account).
7. Password can not be the same as the username.
Thanks!
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2005 07:34 AM
05-11-2005 07:34 AM
Solution
The default password policy for Linux requires passwords a minimum of six characters.
2 Expiration can be scripted with the passwd command.
passwd -x maxdays
3 Password re-use is not permitted although I don't know what the default depth is.
4 Account is not locked after 3 fails. This can be done by script:
strings /var/log/btmp | grep username | wc -l
If the username shows up three times issue a passwd -l and its locked.
5 Not sure this can be done. It can with hpux.
7 (6?) the crack library prevents this for regular users
Its almost all built in, though it requires some scripting.
http://www.tldp.org has some docs that can help you do this in a more integrated way.
SEP
2 Expiration can be scripted with the passwd command.
passwd -x maxdays
3 Password re-use is not permitted although I don't know what the default depth is.
4 Account is not locked after 3 fails. This can be done by script:
strings /var/log/btmp | grep username | wc -l
If the username shows up three times issue a passwd -l
5 Not sure this can be done. It can with hpux.
7 (6?) the crack library prevents this for regular users
Its almost all built in, though it requires some scripting.
http://www.tldp.org has some docs that can help you do this in a more integrated way.
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
05-11-2005 12:31 PM
05-11-2005 12:31 PM
Re: How to define password policy on Linux
SEP covered most of the points already.
I'll add this:
5. Create the user with an expired password already. First login will ask for a new password.
Most of the other bits and pieces is PAM territory. The password restrictions are all 'pam_cracklib' stuff (you should have '/usr/share/doc/pam-0.*/txts/README.pam_cracklib' on your system which documents it), and it's reasonably powerful.
One thing I have noticed though is that Linux can sometimes let a user through the password change routine upon login, but the expiration values are updated. I've only seen this in an NIS situation however.
I'll add this:
5. Create the user with an expired password already. First login will ask for a new password.
Most of the other bits and pieces is PAM territory. The password restrictions are all 'pam_cracklib' stuff (you should have '/usr/share/doc/pam-0.*/txts/README.pam_cracklib' on your system which documents it), and it's reasonably powerful.
One thing I have noticed though is that Linux can sometimes let a user through the password change routine upon login, but the expiration values are updated. I've only seen this in an NIS situation however.
One long-haired git at your service...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2005 06:23 PM
05-11-2005 06:23 PM
Re: How to define password policy on Linux
the requirement of length, reusing of previous password, password not of same as username can be set through PAM configuration. read the pam module document to findout how to do this.
expire can be set through passwd -x
if you are using latest SUSE distribution there is option to force the user to change password after first login. option is passwd -e
Regards,
Gopi
Never Never Never Giveup
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