"chage" command query
Hi All,
I would like to know the meaning of "chage -M 0". When maxdays value is set to zero for a perticular user password, the "chage -l" command shows that the password will never expire. But it's getting expired in 24 hours. 1.Then waht is the meaning of this value zero here? 2.what is the range for MAXDAYS ? 3. How can disable password expiry for a perticular user using this command? Please help me find the answers for my questions. Thank You. Warm Regard, Vijay S. |
The questions you present sound like "theoretical" questions--as though someone is trying to make sure you understand how a command works. And that's usually in an instructional environment. I could be wrong, but because that's my impression, I'll give you a link. All your questions can be answered by reviewing the
chage(1) man page If, after you read that page you still do no know the answers or do not understand what the man page is saying, post back with a question describing what you don't understand. EDIT: Some egg on my face... the man page does not specify what the absolute maximum value of MAXDAYS can be, but I've got a strong suspicion what it is... |
Thanx for your reply.
I have understood the command. when I set the MAXDAYS as zero, the password will be valid for 24 hours, because after 24 hours only the MAXDAY value will become 1Day and the password/account will not be active after that. But I am confused by the output of "chage -l" command. please check the below output. bash-2.05a# chage -M 0 vijay bash-2.05a# chage -l vijay Minimum: 0 Maximum: 0 Warning: 7 Inactive: 0 Last Change: Jan 14, 2012 Password Expires: Never Password Inactive: Never Account Expires: Never bash-2.05a# date Fri Jan 13 20:12:38 LST 2012 bash-2.05a# Even though the password/account will be active for next 24 hours the "chage -l" command shows that the password will Never expire. which is wrong. Please let me know your opinion. |
Well, that specific problem does not occur on my system (Debian 6.0.3):
Code:
root@localhost# chage -l nobody Keep in mind, that is speculation on my part. The output of your chage command does not match mine. The behavior of your chage does not match mine. By definition, all I can do is speculate as to why your system is behaving the way it is when I have no way to reproduce it on my end. EDIT: I wanted to find out what version of chage comes with Debian 6.0.3 so I did a Google search. I did not find that specific information, but I did find an old Debian bug report. The bug report is not directly relevant to your problem. However, if you look at the responses to the bug, there is an indication that PAM modules may be involved. So that is another avenue for you to consider for your behavior: PAM config. |
Quote:
which distro are you using? As your date is also showing the wrong one. 14th which is supposed to be tomorrow? here I did the same in my Redhat 5.2 and this is the output Code:
#chage -M 0 deepak |
Thanx for the replies,
I tested the same on fedora 10 machine and it is working properly. Now I have to check it on the target system, why it is showing wrong info. @Deepak: I had changed the system date for testing... that's not a problem. Thank You guys, Warm Regards, Vijay S. |
All times are GMT -5. The time now is 11:02 PM. |