Lock user ID :
# passwd -l username
Unlock user ID :
# passwd -d username
Unlock user ID and force user to enter new password :
# passwd -df username
Note: This will unlock the user id, and force the user to enter a new password at next login.
-d deletes the password; use -u to only unlock the account