How do I specify the date on which to lock a user account in Linux?



  • To lock a user account on 21st July 2009:

    # /usr/bin/chage -E 2009-07-21 testuser
    

    You will see that /etc/shadow shows 14445 (number of days since 1st January 1970) and 14446 (number of days between 21st July 2009 and 1st January 1970):

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

Log in to reply
 

© Lightnetics 2024