table of contents
- bookworm 1:4.13+dfsg1-1+b1
- testing 1:4.16.0-5
- unstable 1:4.16.0-7
- experimental 1:4.17.0~rc1-1
chage(1) | Пользовательские команды | chage(1) |
НАЗВАНИЕ¶
chage - изменяет информацию об устаревании пароля пользователя
СИНТАКСИС¶
chage [параметры] УЧЁТНАЯ_ЗАПИСЬ
ОПИСАНИЕ¶
The chage command changes the number of days between password changes and the date of the last password change. This information is used by the system to determine when a user must change their password.
ПАРАМЕТРЫ¶
The options which apply to the chage command are:
-d, --lastday LAST_DAY
-E, --expiredate EXPIRE_DATE
For example the following can be used to set an account to expire in 180 days:
chage -E $(date -d +180days +%Y-%m-%d)
Passing the number -1 as the EXPIRE_DATE will remove an account expiration date.
-h, --help
-i, --iso8601
-I, --inactive INACTIVE
Passing the number -1 as the INACTIVE will remove an account's inactivity.
-l, --list
-m, --mindays MIN_DAYS
-M, --maxdays MAX_DAYS
Passing the number -1 as MAX_DAYS will remove checking a password's validity.
-R, --root CHROOT_DIR
-W, --warndays WARN_DAYS
If none of the options are selected, chage operates in an interactive fashion, prompting the user with the current values for all of the fields. Enter the new value to change the field, or leave the line blank to use the current value. The current value is displayed between a pair of [ ] marks.
ЗАМЕЧАНИЕ¶
The chage program requires a shadow password file to be available.
The chage program will report only the information from the shadow password file. This implies that configuration from other sources (e.g. LDAP or empty password hash field from the passwd file) that affect the user's login will not be shown in the chage output.
The chage program will also not report any inconsistency between the shadow and passwd files (e.g. missing x in the passwd file). The pwck can be used to check for this kind of inconsistencies.
The chage command is restricted to the root user, except for the -l option, which may be used by an unprivileged user to determine when their password or account is due to expire.
НАСТРОЙКА¶
The following configuration variables in /etc/login.defs change the behavior of this tool:
ФАЙЛЫ¶
/etc/passwd
/etc/shadow
ВОЗВРАЩАЕМЫЕ ЗНАЧЕНИЯ¶
The chage command exits with the following values:
0
1
2
15
СМОТРИТЕ ТАКЖЕ¶
03/23/2023 | shadow-utils 4.13 |