Bug 1183638
| Summary: | Issue using chage command to remove account expiration date. | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Chinmay Paradkar <cparadka> | |
| Component: | shadow-utils | Assignee: | Tomas Mraz <tmraz> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | BaseOS QE Security Team <qe-baseos-security> | |
| Severity: | urgent | Docs Contact: | ||
| Priority: | urgent | |||
| Version: | 6.6 | CC: | atolani, cameronbaker17, dapospis, ekeck, jkurik, jsvarova, ksrot, pkis, tmraz | |
| Target Milestone: | rc | Keywords: | Regression, ZStream | |
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | shadow-utils-4.1.4.2-20.el6 | Doc Type: | Bug Fix | |
| Doc Text: |
Previously, the system administrator could not remove the account expiration date and the date of the last password change using the "chage -E -1" and "chage -d -1" commands. The bug in the "date" parsing code has been fixed, and it is again possible to remove the account expiration date and the date of the last password change using the aforementioned commands.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1206273 (view as bug list) | Environment: | ||
| Last Closed: | 2015-10-22 09:35:26 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1206273 | |||
|
Description
Chinmay Paradkar
2015-01-19 11:11:50 UTC
You can use chage -d '' <account> instead of editing the file manually. I meant use chage -E '' <account> of course. 1) Running "chage" for a new user:
# chage -l chinmay
Last password change : Jan 21, 2015
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
2) Removing account expiration date.
# chage -E -1 chinmay
# chage -l chinmay
Last password change : Jan 21, 2015
Password expires : never
Password inactive : never
Account expires : Jan 20, 11761191
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
3) Testing the command with provided option.
# chage -E '' chinmay
chage: invalid date ''
Usage: chage [options] [LOGIN]
Options:
-d, --lastday LAST_DAY set date of last password change to LAST_DAY
-E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
-h, --help display this help message and exit
-I, --inactive INACTIVE set password inactive after expiration
to INACTIVE
-l, --list show account aging information
-m, --mindays MIN_DAYS set minimum number of days before password
change to MIN_DAYS
-M, --maxdays MAX_DAYS set maximim number of days before password
change to MAX_DAYS
-W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS
# chage -E ' ' chinmay
# chage -l chinmay
Last password change : Jan 21, 2015
Password expires : never
Password inactive : never
Account expires : Jan 21, 2015
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
The above command causes the account to expire immediately, instead of removing the account expiration date.
*** Bug 1184184 has been marked as a duplicate of this bug. *** *** Bug 1183993 has been marked as a duplicate of this bug. *** |