Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-08-2009, 04:17 AM   #1
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 30
password policy

I would like to change the password policy as if the user do not change the password after it is expired for 5 days , then lock the a/c , can advise what can i do ? thx
Old 07-08-2009, 04:35 AM   #2
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Originally Posted by ust View Post
I would like to change the password policy as if the user do not change the password after it is expired for 5 days , then lock the a/c , can advise what can i do ? thx
If you're using kde, then you can use the KDE User Manager to do this. Open it and fill in the root pwd prompt and then click on the "Users" tab. Find the user you want to change and highlight the name. In the "Users" menu click on Edit and then on Password Management. There you can change the password pollcies.
Old 07-08-2009, 06:53 AM   #3
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 252Reputation: 252Reputation: 252
You're in luck, there's actually a way to do that!

You should have a /etc/default/useradd file (or something similar). Within that file, I'm pretty sure you can set the following option;


This option actually sets when to flag an account as "inactive" after it's password expired, but hasn't been changed.

Note that this will only affect newly created users, and only the traditional "local users". If you're using anything like LDAP, you'll have to fall back on that documentation.

To retroactively change each user account on your server(s), you'll have to run the following command on each account.

chage -I <days> <account_name>

You can also view the current ageing setup for each user by running this;

chage -l <account_name>

Please note that you don't want to do this to *all* accounts on your system. Some accounts don't have passwords set, nor would they have password ageing setup.
Best not to mess with accounts like "bin", "sshd", etc.

Hope this helps!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
password policy Nick Pontelando Linux - Security 9 08-15-2012 09:50 AM
How to set the password policy and lockout policy bin_shell Linux - Security 4 03-24-2010 03:30 PM
Password Policy jagnikam Linux - Security 1 08-22-2008 02:47 PM
Password policy Bharat Kumar pankaj Linux - Server 1 08-17-2008 01:47 AM
Password policy sunhui Linux - Software 2 05-12-2006 03:19 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:48 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration