Which tool enforces mandatory access controls at the kernel level in Linux?

  • SELinux
  • AppArmor
  • UAC
  • sudo
SELinux (Security-Enhanced Linux) enforces mandatory access controls at the kernel level in Linux. It provides a powerful and flexible security framework that allows administrators to define fine-grained access policies for processes, files, and resources on a system.

To restrict users from logging in via SSH, you would modify the ________ file.

  • /etc/ssh/sshd_config
  • /etc/ssh/ssh_config
  • /etc/sshd/ssh_config
  • /etc/ssh/sshd
To restrict users from logging in via SSH, you would modify the /etc/ssh/sshd_config file. This file contains configuration options for the SSH server, and you can specify access restrictions and settings here.

Which command is used to view the list of scheduled tasks for the system?

  • cronlist
  • crontab -l
  • schedulelist
  • tasks
The command "crontab -l" is used to view the list of scheduled tasks (cron jobs) for the system. It lists the cron entries for the currently logged-in user. Scheduled tasks are used to automate various processes at specific times or intervals in a Linux system.

To execute a script in Bash, you often need to make it executable and then use the ________ symbol before the script name.

  • ./
  • &
  • ~
  • $
To execute a script in Bash, you often need to make it executable by running chmod +x script_name, and then you use the ./ symbol before the script name to specify the current directory. This tells the shell to execute the script from the current directory.

Which command can be used in a shell script to introduce a delay, often used for debugging or to pause the execution?

  • sleep
  • wait
  • pause
  • delay
The sleep command is used in a shell script to introduce a delay. You specify the number of seconds to pause the script's execution. It's commonly used for debugging to observe intermediate results or to add pauses for various purposes.

In Bash, the ________ construct allows you to execute a specific block of code repeatedly as long as a certain condition is true.

  • while
  • until
  • for
  • if
In Bash, the while construct allows you to execute a specific block of code repeatedly as long as a certain condition is true. It's commonly used for creating loops in Bash scripts.

Your organization is implementing a policy to disable root login via SSH. Which configuration file and parameter should you modify?

  • /etc/ssh/sshd_config, PermitRootLogin
  • /etc/ssh/sshd_config, AllowRoot
  • /etc/ssh/ssh_config, DenyRoot
  • /etc/ssh/ssh_config, RootLogin
To disable root login via SSH, you should modify the /etc/ssh/sshd_config file and set the PermitRootLogin parameter to no. This enhances security by preventing direct root logins, encouraging users to log in as a regular user and then use sudo for administrative tasks.

To compare two numbers in Bash and check if they're equal, you'd use the ________ operator within a conditional statement.

  • ==
  • =
  • !=
  • <>
To compare two numbers in Bash and check if they're equal, you'd use the == operator within a conditional statement. The == operator is used for equality comparison in Bash.

Which file in Linux contains the hashed password information for users?

  • /etc/shadow
  • /etc/passwd
  • /etc/group
  • /etc/login
In Linux, the hashed password information for users is stored in the /etc/shadow file. This file contains encrypted password hashes and other security-related information, such as password expiration dates, for user accounts. It is essential for protecting user credentials.

Which file defines the default settings when a new user account is created?

  • /etc/default/user.conf
  • /etc/useradd.conf
  • /etc/default/useradd
  • /etc/login.defs
The file that defines the default settings when a new user account is created in Linux is /etc/login.defs. This file contains various parameters and settings related to user account creation, password policies, and more. Modifying this file can affect the behavior of the useradd and adduser commands.

SELinux operates under what primary modes?

  • Enforcing and Permissive
  • Passive and Active
  • Standard and Enhanced
  • Basic and Advanced
SELinux operates under two primary modes: Enforcing and Permissive. In Enforcing mode, SELinux actively enforces security policies and denies any actions that violate these policies. In Permissive mode, SELinux logs policy violations but doesn't actively deny them, making it a useful mode for policy debugging.

To ensure a consistent policy across machines, SELinux policies can be stored in _________ format.

  • YAML
  • XML
  • Binary
  • Text
To ensure a consistent policy across machines, SELinux policies can be stored in Text format. The SELinux policy language is human-readable and editable in text format, making it easier to understand and manage security policies.