An administrator needs to add a new user named 'jdoe' with a home directory and default group. Which command should be used?
Trap 1: groupadd jdoe
Wrong: groupadd creates a new group, not a user.
Trap 2: passwd jdoe
Wrong: passwd is used to set or change a user's password, but the user must already exist.
Trap 3: usermod jdoe
Wrong: usermod modifies an existing user; it does not create a new user.
- A
useradd jdoe
Correct: useradd creates a new user with default home directory and group settings.
- B
groupadd jdoe
Why wrong: Wrong: groupadd creates a new group, not a user.
- C
passwd jdoe
Why wrong: Wrong: passwd is used to set or change a user's password, but the user must already exist.
- D
usermod jdoe
Why wrong: Wrong: usermod modifies an existing user; it does not create a new user.