This content has been marked as final. Show 3 replies
You could just change the date in the /etc/shadow file. This will give you more time. The 3rd field is the last password change field and this will be the part you will need to change. This fix works on local accounts and you need to be root to edit the shadow file.
Also passwd -x does the same thing as above.
# passwd -x 90
The example above sets your account to have 90 days between password changes. Again you need to be root.
If your a NIS, NIS+ or LDAP user then you can do this.
# passwd -r files -x 90
In the example above only use -r with one option like -r ldap. Again you need to be root.
You can also use usermod to modify the user account. Again you need to be root.
yes, "passwd -u" resets the expiration counter and will be safer than manually editing the /etc/shadow file. this will also keep you in line with any existing security requirements as opposed to eliminating the expiration or extending the time period.
passwd -u unlocks a locked account.
To set password expiry use passwd -x -1 <some value>, eg. passwd -x -1 90, the value 90 here set the password to expire after 90 days.