Which file restricts locations from which users cannot log in using the root user account?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The file that restricts locations from which users cannot log in using the root user account is the /etc/securetty file. This file lists the terminals or devices from which the root user is allowed to log in. By default, certain terminals are included, and the root user is generally restricted from logging in from other locations to enhance system security.

When it comes to securing the root account, limiting its access is a crucial step in preventing unauthorized users from gaining control over the system. The /etc/securetty file essentially acts as a whitelist of terminals for root access, ensuring that root logins are carefully monitored and controlled.

The other files mentioned serve different purposes:

  • /etc/passwd is used for storing user account information, including usernames, user IDs (UID), group IDs (GID), and home directories, but it does not control login access for root.

  • /etc/ssh/sshd_config is a configuration file for the SSH daemon, which includes settings related to secure shell access but does not specifically manage root login permissions across all terminals.

  • /usr/local/securetty is not a standard file used in most Linux distributions and is not recognized in the context of root login restrictions.

Overall, /etc/

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy