Question 1070
On a RHEL 10 host, local account local54 is in a controlled provisioning task. The immediate requirement is to create the local user and its home directory. Which command is appropriate?
Explanation
Correct Answer
useradd -m creates the account and requests creation of the user home directory That action meets the user-account requirement. This matches the stated requirement to create the local user and its home directory. By contrast, the plausible alternative `usermod -d /home/local542 -m local54` has the effect: usermod -d with -m changes the home path and moves existing home content It changes a different attribute or lifecycle state of the user; that operation would not achieve the requested result.
Incorrect Answers
passwd -l locks the stored password hash for password authentication; it does not necessarily block every other authentication method It changes a different attribute or lifecycle state of the user. The stated task is to create the local user and its home directory. Instead, `useradd -m local54` is the relevant alternative because useradd -m creates the account and requests creation of the user home directory That action meets the user-account requirement.
usermod -s updates the login shell field in the user record It changes a different attribute or lifecycle state of the user. The stated task is to create the local user and its home directory. Instead, `useradd -m local54` is the relevant alternative because useradd -m creates the account and requests creation of the user home directory That action meets the user-account requirement.
usermod -d with -m changes the home path and moves existing home content It changes a different attribute or lifecycle state of the user. The stated task is to create the local user and its home directory. Instead, `useradd -m local54` is the relevant alternative because useradd -m creates the account and requests creation of the user home directory That action meets the user-account requirement.






Red Hat Certified System Administrator (RHCSA) (EX200) Practice Tests