#Bash 的 expiry 命令
expiry OPTION
功能
检查并执行密码过期策略。
类型
可执行文件(/usr/bin/expiry),属于 passwd。
参数
OPTION选项:-c,--check- 检查当前用户的密码是否过期-f,--force- 检查当前用户的密码是否过期,如果过期则强制其更改密码-h,--help- 查看帮助信息
#示例
$ expiry -c
#推荐阅读
#手册
EXPIRY(1) User Commands EXPIRY(1)
NAME
expiry - check and enforce password expiration policy
SYNOPSIS
expiry option
DESCRIPTION
The expiry command checks (-c) the current password expiration and
forces (-f) changes when required. It is callable as a normal user
command.
OPTIONS
The options which apply to the expiry command are:
-c, --check
Check the password expiration of the current user.
-f, --force
Force a password change if the current user has an expired password.
-h, --help
Display help message and exit.
FILES
/etc/passwd
User account information.
/etc/shadow
Secure user account information.
SEE ALSO
passwd(5), shadow(5).
shadow-utils 4.17.4 02/02/2026 EXPIRY(1)