What command removes the lock on a user account?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The command that removes the lock on a user account is associated with the passwd utility. The option that designates this function, passwd -u, successfully unlocks a user account by removing the lock and allowing the user to log in again.

When a user account is locked, usually indicated by a "!" or "*" in front of the password field in the /etc/shadow file, the user cannot authenticate. The passwd -u command specifically targets this aspect, enabling access by modifying the password field to restore the standard functionality.

In situations where a user account is created or modified, the useradd and usermod commands are indeed used, but they do not include options to unlock a user account in the form suggested here. The userdel command is intended for deleting user accounts entirely, not for removing a lock. Thus, understanding the functionality behind these commands clarifies why passwd -u is correctly identified as the command to remove the lock on a user account.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy