How do I specify the number of days before an account is locked in Linux?



  • To specify that the account for user testuser should be locked 3 days after the password has expired:

    # /usr/bin/chage -I 3 testuser
    

    You can check the result in /etc/shaow (last but one field)

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

Log in to reply
 

© Lightnetics 2024