exam questions

Exam LX0-104 All Questions

View all questions & answers for the LX0-104 exam

Exam LX0-104 topic 7 question 14 discussion

Actual exam question from CompTIA's LX0-104
Question #: 14
Topic #: 7
[All LX0-104 Questions]

Which of the following steps prevents a user from obtaining an interactive login session?

  • A. Run the command chsh -s /bin/false with the user name.
  • B. Set the UID for the user to 0.
  • C. Remove the user from the group staff.
  • D. Add the user to /etc/noaccess.
  • E. Create a .nologin file in the user's home directory.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
linux_admin
2 years, 2 months ago
Selected Answer: B
One way to prevent a user from obtaining an interactive login session is to create a .nologin file in the user's home directory. When the system encounters a .nologin file in a user's home directory, it will prevent the user from logging in and will display the contents of the file as a message to the user. This is typically used to inform the user that the system is down for maintenance or that their account has been disabled. For example, the contents of a .nologin file might look like this: This account is currently unavailable. Please try again later. When the user tries to log in, they will see the message contained in the .nologin file, but will not be able to log in.
upvoted 1 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