Welcome to the most active Linux Forum on the web.
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 11-27-2008, 07:34 AM   #1
LQ Newbie
Registered: Jul 2007
Posts: 18

Rep: Reputation: 0
Chage command

Hi guys,

I implemented the chage command above to users in our server, however a funnny thing happened that I am unable to resolve.
Here is what went on.

>> Before making any changes
# chage -l user
Last password change : Nov 24, 2008
Password expires : Dec 23, 2008
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 29
Number of days of warning before password expires : 10

There are two outputs of chage command I dont understand.
When I run it
# chage -M 65 -m 1 -W 7 -E 14 user
The user is not able to log and is told accout in expired contact system administrator

# chage -M 65 -m 1 -W 7 -E -1 user
Runs fine the results of chage -l user indicate the password does not expire.

What I really want to achieve is to make the accounts of already existing users to expire after certain number of days if password is not changed and at the same time I dont want to lock them out.
Old 11-27-2008, 10:06 AM   #2
Registered: Nov 2004
Location: Maryland, USA
Distribution: Mint 13
Posts: 276

Rep: Reputation: 31
I looked in the man page for chage and the -E option needs a date or a number of days after January 2, 1970. So that would be a pretty big number. Try using a -e 2008-12-11 to give them 2 weeks.

       -E, --expiredate EXPIRE_DATE
           Set the date or number of days since January 1, 1970 on which the
           userīs account will no longer be accessible. The date may also be
           expressed in the format YYYY-MM-DD (or the format more commonly
           used in your area). A user whose account is locked must contact the
           system administrator before being able to use the system again.

           Passing the number -1 as the EXPIRE_DATE will remove an account
           expiration date.


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
how to chage the desktop Robin01 Linux - Newbie 1 09-26-2004 08:29 PM
Chage the language locale ust Linux - Software 0 08-16-2004 03:59 AM
How to Chage from DHCP to static jamescov Linux - Networking 2 11-13-2003 09:48 PM
About the chage ust Linux - General 2 10-11-2003 08:28 AM
Can't chage screen resolution in KDE 3.1 robo555 Linux - Software 1 03-24-2003 08:15 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:15 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