Linux chage command set and unset expire date for given user account

Fig.02: Linux chage command set and unset expire date for given user account

Fig.02: Linux chage command set and unset expire date for given user account

To lock down user password and expire account type:

passwd -l user
passwd -E 0 user

To unlock the account and remove expiry date type:

passwd -u user
chage -E -1 user
## optional set a new password ##
passwd user

All command must run as root user.

Examples and usage: Linux Locking An Account