CompTIA Linux+ (XK0-004) — Question 43
An administrator is uncomfortable allowing users to log in as root. Which of the following ensures that root logins are disallowed?
Answer options
- A. usermod -L root
- B. usermod -G root
- C. usermod -B root
- D. usermod -U root
Correct answer: B
Explanation
The correct answer is B, as using 'usermod -G root' allows you to manage group memberships and can be configured to restrict root access. The other options either lock the root account (A), change the primary group (C), or unlock the root account (D), which does not help in disallowing root login.