Friday, October 11, 2024

Set policy password expire and warning Ubuntu 22.04

Check current password expiration settings
sudo chage -l <username>
Force password change on next login
sudo chage -d 0 <username>
Set a password expiration policy
sudo chage -M 90 <username>
(Optional) Set password warning period
sudo chage -W 7 <username>
Verify changes
sudo chage -l <username>

Ref
  • https://chatgpt.com/share/6708c50a-d480-8010-8ea4-418483178302

No comments:

Post a Comment

Popular Posts