加入收藏 | 设为首页 | 会员中心 | 我要投稿 银川站长网 (https://www.0951zz.com/)- 云通信、基础存储、云上网络、机器学习、视觉智能!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

对 Linux 的变动进行详细解释的命令

发布时间:2023-10-20 12:47:42 所属栏目:Linux 来源:
导读:linux chage命令简介:chage命令用于密码实效管理,该是用来修改帐号和密码的有效期限。它可以修改账号和密码的有效期。对于chage命令的描述如下所示:The chage command changes the number of days between passwo

linux chage命令简介:

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 his/her password

命令语法:

chage [options] user

密码过期前,提前收到警告信息的天数。

使用示例:

1: 查看chage命令的帮助信息

[root@DB-Server ~]#man chage

[root@DB-Server ~]# info chage

[root@DB-Server ~]# chage -h

Usage: chage [options] user

Options:

-d, --lastday LAST_DAY set 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

2:查看mysql用户以及密码的有效期

[root@DB-Server ~]# chage -l mysql

Last password change : Mar 26, 2015

Password expires : never

Password inactive : never

Account expires : never

Minimum number of days between password change : -1

Maximum number of days between password change : -1

Number of days of warning before password expires : -1

[root@DB-Server ~]#

3:设置mysql用户60天后密码过期,至少7天后才能修改密码,密码过期前7天开始收到告警信息。

(编辑:银川站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章