0
0
Linux CLIscripting~5 mins

passwd (change password) in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the primary purpose of the passwd command in Linux?
The passwd command is used to change a user's password securely on a Linux system.
Click to reveal answer
beginner
Which user can change another user's password using passwd?
Only the root user (administrator) can change other users' passwords using passwd username.
Click to reveal answer
beginner
What happens if you run passwd without any arguments?
It prompts you to change the password of the current logged-in user.
Click to reveal answer
beginner
Why does passwd not show characters when you type your new password?
For security, passwd hides input so no one can see your password as you type.
Click to reveal answer
intermediate
How can you force a user to change their password at next login?
Use passwd -e username to expire the password and require a change on next login.
Click to reveal answer
What does the command passwd do when run by a normal user?
ADeletes the current user's password
BDisplays the current user's password
CChanges another user's password
DChanges the current user's password
Who can change another user's password using passwd username?
AOnly root user
BNo one can change others' passwords
COnly users in the sudo group
DAny logged-in user
What option forces a user to change their password at next login?
A-e
B-d
C-l
D-r
Why does passwd not show your password characters when typing?
ABecause the terminal is broken
BFor security to hide your password
CTo save screen space
DBecause passwords are not needed
What happens if you run passwd username as root?
ALocks the user account
BDeletes the user
CChanges the password for the specified user
DDisplays user info
Explain how to change your own password using the passwd command.
Think about what happens when you just type 'passwd' and press enter.
You got /4 concepts.
    Describe how an administrator can force a user to update their password at next login.
    Look for the option that expires passwords.
    You got /4 concepts.