锁定用户(针对有密码的用户):
passwd -l username
对用户解除锁定:
passwd -u username