What does the '-l' option do in the 'passwd' command?

QuestionsQuestions8 SkillsProUser Account ManagementSep, 07 2025
0123

The -l option in the passwd command is used to lock a user account. When you run the command with this option, it prevents the user from logging in by disabling their password.

Example Usage

sudo passwd -l username

This command locks the account for the specified username.

Further Learning

For more details on user account management, you might want to explore related labs on LabEx.

0 Comments

no data
Be the first to share your comment!