exam questions

Exam XK0-004 All Questions

View all questions & answers for the XK0-004 exam

Exam XK0-004 topic 1 question 140 discussion

Actual exam question from CompTIA's XK0-004
Question #: 140
Topic #: 1
[All XK0-004 Questions]

An administrator is uncomfortable allowing users to log in as root. Which of the following ensures that root logins are disallowed?

  • A. usermod -L root
  • B. usermod -G root
  • C. usermod -B root
  • D. usermod -U root
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
Reference:
https://web.mit.edu/rhel-doc/4/RH-DOCS/rhel-sg-en-4/s1-wstation-privileges.html

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
brandonwyo
Highly Voted 4 years, 5 months ago
c = We can add comment field for the useraccount. -d = To modify the directory for any existing user account. -e = Using this option we can make the account expiry in specific period. -g = Change the primary group for a User. -G = To add a supplementary groups. -a = To add anyone of the group to a secondary group. -l = To change the login name from tecmint to tecmint_admin. -L = To lock the user account. This will lock the password so we can’t use the account. -m = moving the contents of the home directory from existing home dir to new dir. -p = To Use un-encrypted password for the new password. (NOT Secured). -s = Create a Specified shell for new accounts. -u = Used to Assigned UID for the user account between 0 to 999. -U = To unlock the user accounts. This will remove the password lock and allow us to use the user account.
upvoted 16 times
betty_boop
4 years, 5 months ago
So it's A. usermod -L root Right?
upvoted 13 times
Icarus1987
4 years, 1 month ago
Yes, answer is A. From the man page of usermod: "-L, --lock Lock a user's password. This puts a '!' in front of the encrypted password, effectively disabling the password. You can't use this option with -p or -U."
upvoted 5 times
...
...
...
Petter07
Most Recent 2 years, 4 months ago
"A" is correct. If you are concerned about unauthorized access to the root user account, you can use the usermod -L root command to lock the account and prevent anyone from logging in as root. You can then use the su command or sudo command to switch to the root user account when you need to perform administrative tasks.
upvoted 2 times
...
DiaaEmara
2 years, 5 months ago
-G https://books.google.com.eg/books?id=bh6LSvafC28C&pg=PA54&lpg=PA54&dq=An+administrator+is+uncomfortable+allowing+users+to+log+in+as+root.+Which+of+the+following+ensures+that+root+logins+are+disallowed?&source=bl&ots=Jpys2wJs9u&sig=ACfU3U306mY8Yycz9uj_kKq0-ltyMZZwbw&hl=en&sa=X&ved=2ahUKEwjOv8usht37AhXPSPEDHSNGD3oQ6AF6BAgTEAM#v=onepage&q=%20usermod&f=false
upvoted 1 times
DiaaEmara
2 years, 5 months ago
4.4.3.1. The su Command Upon typing the su command, the user is prompted for the root password and, after authentication, is given a root shell prompt. Once logged in via the su command, the user is the root user and has absolute administrative access to the system. In addition, once a user has become root, it is possible for them to use the su command to change to any other user on the system without being prompted for a password. Because this program is so powerful, administrators within an organization may wish to limit who has access to the command. One of the simplest ways to do this is to add users to the special administrative group called wheel. To do this, type the following command as root: usermod -G wheel <username> In the previous command, replace <username> with the username you want to add to the wheel group. To use the User Manager for this purpose, go to the Main Menu Button (on the Panel) => System Settings => Users & Groups or type the command system-config-users at a shell prompt. Select the Users tab, select the user from the user list, and click Properties from the button menu (or choose File => Properties from the pull-down menu).
upvoted 1 times
...
...
examtopics_htc
2 years, 6 months ago
Selected Answer: A
Lock the user account with -L
upvoted 2 times
...
Tlin
2 years, 7 months ago
Answer should be A.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago