How do I force immediate user password expiration in Linux?



  • # /usr/bin/chage -d 0 newuser
    

    This immediately expires the password for user newuser, regardless of any password aging policy that may be in place.

    The user newuser will then be prompted to change their password at next login:

    $ su - newuser
    Password:
    You are required to change your password immediately (root enforced)
    Changing password for newuser
    (current) UNIX password:
    New UNIX password:
    Retype new UNIX password:
    

Log in to reply
 

© Lightnetics 2024