CompTIA Linux+ Security and Access Control Flashcards
5 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 5 CompTIA Linux+ Security and Access Control flashcards as text
Which of the following commands is used to add a new user to a Linux system?
Answer: Both A and B
Both `useradd` and `adduser` commands are used to add new user accounts to a Linux system. While `useradd` is a low-level utility that requires more manual configuration, `adduser` is a more user-friendly script that often calls `useradd` internally and provides interactive prompts for common settings. Both achieve the goal of creating a new user.
Which of the following files contains user account information on a Linux system?
Answer: All of the above
All three files are crucial for user account information. `/etc/passwd` stores basic user account details (username, UID, GID, home directory, shell). `/etc/shadow` stores encrypted user passwords and password aging information, providing enhanced security. `/etc/group` defines user groups and their members. Together, these files manage user identities and access.
Which of the following is a correct example of setting file permissions using symbolic notation with the chmod command?
Answer: All of the above
All the provided options are correct examples of setting file permissions using symbolic notation with the `chmod` command. `u+x` adds execute permission for the user, `o-r` removes read permission for others, and `755` is an octal notation that translates to `u=rwx,g=rx,o=rx` (read, write, execute for owner; read, execute for group and others). Symbolic notation uses letters and symbols to represent changes, offering flexibility.
Which of the following commands is used to view the current SELinux status on a system?
Answer: sestatus
The `sestatus` command is used to display the current status of SELinux (Security-Enhanced Linux) on a system. It provides information such as whether SELinux is enabled or disabled, its current mode (enforcing, permissive, or disabled), and the policy being used. This command is essential for monitoring and managing SELinux security policies.
What does the sudo command allow a user to do in a Linux system?
Answer: Run commands as the root user or another user
The `sudo` command (substitute user do) allows a permitted user to execute a command as the superuser (root) or another user, as specified by the security policy. This provides a secure way to grant administrative privileges without sharing the root password. It enhances security by logging commands executed with elevated privileges.