5

linux用户密码过期

 2 years ago
source link: https://houye.xyz/2016-11/chage/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
linux用户密码过期

linux用户密码过期

  • 查看用户密码的过期天数
chage -l username
  • 修改用户密码的过期天数为永不过期
chage -M 99999 username
  • 查看默认密码过期天数
cat /etc/login.defs | grep "PASS_MAX_DAYS"
  • 修改默认密码过期天数为永不过期
sed -i.bak 's/^\(PASS_MAX_DAYS\).*/\1   99999/' /etc/login.defs

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK