Unlock guest01 after it was locked with usermod -L.
Which command is appropriate?
usermod -U removes the password lock applied by -L.
Detailed explanation
usermod -L guest01Incorrect. -L applies the lock.
usermod -u guest01Incorrect. Lowercase -u changes the UID and needs a numeric argument.
usermod -U guest01Correct. -U unlocks the password field.
usermod -l guest01Incorrect. Lowercase -l changes the login name.
Try it yourself
An example you can run in a temporary verification environment.
usermod --help | grep -E -- '-U,|--unlock'Expected result
password unlockの説明行Key points
- Uppercase -U unlocks
- Lowercase -u changes UID
- Case matters
Notes
- Environment: shadow-utils usermod help / 状態変更なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Account record
Identity attributes such as a user ID, home directory, and login shell.
Group membership
Primary and supplementary groups used during permission checks.
Password aging
State and time limits that control password changes and account access.