How do I change the minimum number of days between password change?



  • Also see:
    chage - change user password expiry information

           -m, --mindays MIN_DAYS
               Set the minimum number of days between password changes to
               MIN_DAYS. A value of zero for this field indicates that the user
               may change their password at any time.
    

    Check the user password expiry information.

    $ sudo chage -l testuser
    Last password change                                    : Mar 23, 2018
    Password expires                                        : never
    Password inactive                                       : never
    Account expires                                         : Jan 08, 1970
    Minimum number of days between password change          : 0
    Maximum number of days between password change          : 99999
    Number of days of warning before password expires       : 7
    

    Change the minimum number of days between password change to 30 days

    $ sudo chage -m 30 testuser
    

    Check again.

    $ sudo chage -l testuser
    Last password change                                    : Mar 23, 2018
    Password expires                                        : never
    Password inactive                                       : never
    Account expires                                         : Jan 08, 1970
    Minimum number of days between password change          : 30
    Maximum number of days between password change          : 99999
    Number of days of warning before password expires       : 7
    

Log in to reply
 

© Lightnetics 2024