FREE CompTIA Linux+ Security and Access Control Questions and Answers

0%

Which of the following commands is used to add a new user to a Linux system?

Correct! Wrong!

Both useradd and adduser are used to add a new user in Linux. useradd is a low-level command, while adduser is a more user-friendly wrapper around useradd, typically available in Debian-based distributions.

Which of the following files contains user account information on a Linux system?

Correct! Wrong!

/etc/passwd contains user account information, including user name, UID, GID, home directory, and shell. /etc/shadow contains encrypted passwords and password expiration information. /etc/group contains group information, such as group names and associated users.

Which of the following is a correct example of setting file permissions using symbolic notation with the chmod command?

Correct! Wrong!

chmod 755 file.txt sets read, write, and execute permissions for the owner, and read and execute permissions for group and others. chmod u+x file.txt adds execute permission for the owner (user). chmod o-r file.txt removes read permission for others.

Which of the following commands is used to view the current SELinux status on a system?

Correct! Wrong!

The sestatus command is used to display the status of SELinux (Security-Enhanced Linux), showing whether SELinux is enabled or disabled and its current mode (Enforcing, Permissive, or Disabled).

What does the sudo command allow a user to do in a Linux system?

Correct! Wrong!

The sudo command allows a permitted user to execute a command as the superuser or another user, as defined in the /etc/sudoers file. It is typically used to perform administrative tasks without logging in as the root user.