How do I specify the number of days between which users should change their password in Linux?



  • To make users change their password after 30 days:

    # /usr/bin/chage -m 30 testuser
    

    You can check the result in /etc/shadow:

    # /bin/grep testuser /etc/shadow
    testuser:$1$wypNKIu9$Ib3YmLexp7BVl88crX5eE/:14445:30:99999:2::14446:
    

Log in to reply
 

© Lightnetics 2024