Question 1110
On RHEL 10 host secure-14 with SELinux installed and enabled, an administrator must return a permissive selinux system to enforcing now. A review considers `setenforce 0` as an alternative. Its relevant behavior is: setenforce 0 changes a currently enabled SELinux system to permissive at runtime. That is a different result from the requested operation. Which listed command satisfies the original requirement without substituting this other behavior?
- getenforce
- setenforce 1
- setenforce 0
- sestatus
Explanation
Correct Answer
B:setenforce 1 restores runtime enforcing behavior where SELinux is enabled. This matches the stated requirement to return a permissive selinux system to enforcing now. By contrast, the plausible alternative `setenforce 0` has the effect: setenforce 0 changes a currently enabled SELinux system to permissive at runtime; that operation would not achieve the requested result.
Incorrect Answers
A:getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. The stated task is to return a permissive selinux system to enforcing now. Instead, `setenforce 1` is the relevant alternative because setenforce 1 restores runtime enforcing behavior where SELinux is enabled. A separate comparison is `setenforce 0`: setenforce 0 changes a currently enabled SELinux system to permissive at runtime. The stated task is to return a permissive selinux system to enforcing now. Instead, `setenforce 1` is the relevant alternative because setenforce 1 restores runtime enforcing behavior where SELinux is enabled. For the named operational target secure-14, this answer does not perform the requested action; `setenforce 1` is selected to achieve the correct scope instead.
C:setenforce 0 changes a currently enabled SELinux system to permissive at runtime. The stated task is to return a permissive selinux system to enforcing now. Instead, `setenforce 1` is the relevant alternative because setenforce 1 restores runtime enforcing behavior where SELinux is enabled. A separate comparison is `getenforce`: getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. The stated task is to return a permissive selinux system to enforcing now. For the named operational target secure-14, this answer does not perform the requested action; `setenforce 1` is selected to achieve the correct scope instead.
D:sestatus summarizes runtime and file-configured SELinux policy and mode. The stated task is to return a permissive selinux system to enforcing now. Instead, `setenforce 1` is the relevant alternative because setenforce 1 restores runtime enforcing behavior where SELinux is enabled. A separate comparison is `getenforce`: getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. The stated task is to return a permissive selinux system to enforcing now. For the named operational target secure-14, this answer does not perform the requested action; `setenforce 1` is selected to achieve the correct scope instead.
Question 1111
On RHEL 10 host secure-15 with SELinux installed and enabled, an administrator must return a permissive selinux system to enforcing now. A review considers `sestatus` as an alternative. Its relevant behavior is: sestatus summarizes runtime and file-configured SELinux policy and mode. That is a different result from the requested operation. Which listed command satisfies the original requirement without substituting this other behavior?
- getenforce
- setenforce 0
- setenforce 1
- sestatus
Explanation
Correct Answer
C:setenforce 1 restores runtime enforcing behavior where SELinux is enabled. This matches the stated requirement to return a permissive selinux system to enforcing now. By contrast, the plausible alternative `setenforce 0` has the effect: setenforce 0 changes a currently enabled SELinux system to permissive at runtime; that operation would not achieve the requested result. A separate comparison is `setenforce 0`: setenforce 0 changes a currently enabled SELinux system to permissive at runtime. The stated task is to return a permissive selinux system to enforcing now. Instead, `setenforce 1` is the relevant alternative because setenforce 1 restores runtime enforcing behavior where SELinux is enabled.
Incorrect Answers
A:getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. The stated task is to return a permissive selinux system to enforcing now. Instead, `setenforce 1` is the relevant alternative because setenforce 1 restores runtime enforcing behavior where SELinux is enabled. A separate comparison is `sestatus`: sestatus summarizes runtime and file-configured SELinux policy and mode. The stated task is to return a permissive selinux system to enforcing now. Instead, `setenforce 1` is the relevant alternative because setenforce 1 restores runtime enforcing behavior where SELinux is enabled.
B:setenforce 0 changes a currently enabled SELinux system to permissive at runtime. The stated task is to return a permissive selinux system to enforcing now. Instead, `setenforce 1` is the relevant alternative because setenforce 1 restores runtime enforcing behavior where SELinux is enabled. A separate comparison is `sestatus`: sestatus summarizes runtime and file-configured SELinux policy and mode. The stated task is to return a permissive selinux system to enforcing now. Instead, `setenforce 1` is the relevant alternative because setenforce 1 restores runtime enforcing behavior where SELinux is enabled.
D:sestatus summarizes runtime and file-configured SELinux policy and mode. The stated task is to return a permissive selinux system to enforcing now. Instead, `setenforce 1` is the relevant alternative because setenforce 1 restores runtime enforcing behavior where SELinux is enabled. A separate comparison is `setenforce 0`: setenforce 0 changes a currently enabled SELinux system to permissive at runtime. The stated task is to return a permissive selinux system to enforcing now. Instead, `setenforce 1` is the relevant alternative because setenforce 1 restores runtime enforcing behavior where SELinux is enabled.
Question 1112
On RHEL 10 host secure-16 with SELinux installed and enabled, an administrator must read the active selinux enforcement mode. A review considers `sestatus` as an alternative. Its relevant behavior is: sestatus summarizes runtime and file-configured SELinux policy and mode. That is a different result from the requested operation. Which listed command satisfies the original requirement without substituting this other behavior?
- setenforce 0
- setenforce 1
- sestatus
- getenforce
Explanation
Correct Answer
D:getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. This matches the stated requirement to read the active selinux enforcement mode. By contrast, the plausible alternative `setenforce 1` has the effect: setenforce 1 restores runtime enforcing behavior where SELinux is enabled; that operation would not achieve the requested result. A separate comparison is `sestatus`: sestatus summarizes runtime and file-configured SELinux policy and mode. The stated task is to read the active selinux enforcement mode. Instead, `getenforce` is the relevant alternative because getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem.
Incorrect Answers
A:setenforce 0 changes a currently enabled SELinux system to permissive at runtime. The stated task is to read the active selinux enforcement mode. Instead, `getenforce` is the relevant alternative because getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. A separate comparison is `setenforce 1`: setenforce 1 restores runtime enforcing behavior where SELinux is enabled. The stated task is to read the active selinux enforcement mode. Instead, `getenforce` is the relevant alternative because getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. For the named operational target secure-16, this answer does not perform the requested action; `getenforce` is selected to achieve the correct scope instead.
B:setenforce 1 restores runtime enforcing behavior where SELinux is enabled. The stated task is to read the active selinux enforcement mode. Instead, `getenforce` is the relevant alternative because getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. A separate comparison is `setenforce 0`: setenforce 0 changes a currently enabled SELinux system to permissive at runtime. The stated task is to read the active selinux enforcement mode. Instead, `getenforce` is the relevant alternative because getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. For the named operational target secure-16, this answer does not perform the requested action; `getenforce` is selected to achieve the correct scope instead.
C:sestatus summarizes runtime and file-configured SELinux policy and mode. The stated task is to read the active selinux enforcement mode. Instead, `getenforce` is the relevant alternative because getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. A separate comparison is `setenforce 0`: setenforce 0 changes a currently enabled SELinux system to permissive at runtime. The stated task is to read the active selinux enforcement mode. Instead, `getenforce` is the relevant alternative because getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. For the named operational target secure-16, this answer does not perform the requested action; `getenforce` is selected to achieve the correct scope instead.
Question 1113
On RHEL 10 host secure-17 with SELinux installed and enabled, an administrator must inspect configured and current selinux modes. A review considers `setenforce 1` as an alternative. Its relevant behavior is: setenforce 1 restores runtime enforcing behavior where SELinux is enabled. That is a different result from the requested operation. Which listed command satisfies the original requirement without substituting this other behavior?
- sestatus
- getenforce
- setenforce 0
- setenforce 1
Explanation
Correct Answer
A:sestatus summarizes runtime and file-configured SELinux policy and mode. This matches the stated requirement to inspect configured and current selinux modes. By contrast, the plausible alternative `setenforce 1` has the effect: setenforce 1 restores runtime enforcing behavior where SELinux is enabled; that operation would not achieve the requested result. A separate comparison is `getenforce`: getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. The stated task is to inspect configured and current selinux modes. Instead, `sestatus` is the relevant alternative because sestatus summarizes runtime and file-configured SELinux policy and mode.
Incorrect Answers
B:getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. The stated task is to inspect configured and current selinux modes. Instead, `sestatus` is the relevant alternative because sestatus summarizes runtime and file-configured SELinux policy and mode. A separate comparison is `setenforce 1`: setenforce 1 restores runtime enforcing behavior where SELinux is enabled. The stated task is to inspect configured and current selinux modes. Instead, `sestatus` is the relevant alternative because sestatus summarizes runtime and file-configured SELinux policy and mode. For the named operational target secure-17, this answer does not perform the requested action; `sestatus` is selected to achieve the correct scope instead.
C:setenforce 0 changes a currently enabled SELinux system to permissive at runtime. The stated task is to inspect configured and current selinux modes. Instead, `sestatus` is the relevant alternative because sestatus summarizes runtime and file-configured SELinux policy and mode. A separate comparison is `setenforce 1`: setenforce 1 restores runtime enforcing behavior where SELinux is enabled. The stated task is to inspect configured and current selinux modes. Instead, `sestatus` is the relevant alternative because sestatus summarizes runtime and file-configured SELinux policy and mode. For the named operational target secure-17, this answer does not perform the requested action; `sestatus` is selected to achieve the correct scope instead.
D:setenforce 1 restores runtime enforcing behavior where SELinux is enabled. The stated task is to inspect configured and current selinux modes. Instead, `sestatus` is the relevant alternative because sestatus summarizes runtime and file-configured SELinux policy and mode. A separate comparison is `setenforce 0`: setenforce 0 changes a currently enabled SELinux system to permissive at runtime. The stated task is to inspect configured and current selinux modes. Instead, `sestatus` is the relevant alternative because sestatus summarizes runtime and file-configured SELinux policy and mode. For the named operational target secure-17, this answer does not perform the requested action; `sestatus` is selected to achieve the correct scope instead.
Question 1114
On RHEL 10 host secure-18 with SELinux installed and enabled, an administrator must change selinux to permissive for this running session. A review considers `sestatus` as an alternative. Its relevant behavior is: sestatus summarizes runtime and file-configured SELinux policy and mode. That is a different result from the requested operation. Which listed command satisfies the original requirement without substituting this other behavior?
- getenforce
- setenforce 0
- setenforce 1
- sestatus
Explanation
Correct Answer
B:setenforce 0 changes a currently enabled SELinux system to permissive at runtime. This matches the stated requirement to change selinux to permissive for this running session. By contrast, the plausible alternative `sestatus` has the effect: sestatus summarizes runtime and file-configured SELinux policy and mode; that operation would not achieve the requested result. A separate comparison is `setenforce 1`: setenforce 1 restores runtime enforcing behavior where SELinux is enabled. The stated task is to change selinux to permissive for this running session. Instead, `setenforce 0` is the relevant alternative because setenforce 0 changes a currently enabled SELinux system to permissive at runtime.
Incorrect Answers
A:getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. The stated task is to change selinux to permissive for this running session. Instead, `setenforce 0` is the relevant alternative because setenforce 0 changes a currently enabled SELinux system to permissive at runtime. A separate comparison is `setenforce 1`: setenforce 1 restores runtime enforcing behavior where SELinux is enabled. The stated task is to change selinux to permissive for this running session. Instead, `setenforce 0` is the relevant alternative because setenforce 0 changes a currently enabled SELinux system to permissive at runtime. For the named operational target secure-18, this answer does not perform the requested action; `setenforce 0` is selected to achieve the correct scope instead.
C:setenforce 1 restores runtime enforcing behavior where SELinux is enabled. The stated task is to change selinux to permissive for this running session. Instead, `setenforce 0` is the relevant alternative because setenforce 0 changes a currently enabled SELinux system to permissive at runtime. A separate comparison is `getenforce`: getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. The stated task is to change selinux to permissive for this running session. For the named operational target secure-18, this answer does not perform the requested action; `setenforce 0` is selected to achieve the correct scope instead.
D:sestatus summarizes runtime and file-configured SELinux policy and mode. The stated task is to change selinux to permissive for this running session. Instead, `setenforce 0` is the relevant alternative because setenforce 0 changes a currently enabled SELinux system to permissive at runtime. A separate comparison is `getenforce`: getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. The stated task is to change selinux to permissive for this running session. For the named operational target secure-18, this answer does not perform the requested action; `setenforce 0` is selected to achieve the correct scope instead.
Question 1115
On RHEL 10 host secure-19 with SELinux installed and enabled, an administrator must change selinux to permissive for this running session. A review considers `getenforce` as an alternative. Its relevant behavior is: getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. That is a different result from the requested operation. Which listed command satisfies the original requirement without substituting this other behavior?
- getenforce
- setenforce 1
- setenforce 0
- sestatus
Explanation
Correct Answer
C:setenforce 0 changes a currently enabled SELinux system to permissive at runtime. This matches the stated requirement to change selinux to permissive for this running session. By contrast, the plausible alternative `sestatus` has the effect: sestatus summarizes runtime and file-configured SELinux policy and mode; that operation would not achieve the requested result. A separate comparison is `sestatus`: sestatus summarizes runtime and file-configured SELinux policy and mode. The stated task is to change selinux to permissive for this running session. Instead, `setenforce 0` is the relevant alternative because setenforce 0 changes a currently enabled SELinux system to permissive at runtime.
Incorrect Answers
A:getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. The stated task is to change selinux to permissive for this running session. Instead, `setenforce 0` is the relevant alternative because setenforce 0 changes a currently enabled SELinux system to permissive at runtime. A separate comparison is `sestatus`: sestatus summarizes runtime and file-configured SELinux policy and mode. The stated task is to change selinux to permissive for this running session. Instead, `setenforce 0` is the relevant alternative because setenforce 0 changes a currently enabled SELinux system to permissive at runtime.
B:setenforce 1 restores runtime enforcing behavior where SELinux is enabled. The stated task is to change selinux to permissive for this running session. Instead, `setenforce 0` is the relevant alternative because setenforce 0 changes a currently enabled SELinux system to permissive at runtime. A separate comparison is `sestatus`: sestatus summarizes runtime and file-configured SELinux policy and mode. The stated task is to change selinux to permissive for this running session. Instead, `setenforce 0` is the relevant alternative because setenforce 0 changes a currently enabled SELinux system to permissive at runtime.
D:sestatus summarizes runtime and file-configured SELinux policy and mode. The stated task is to change selinux to permissive for this running session. Instead, `setenforce 0` is the relevant alternative because setenforce 0 changes a currently enabled SELinux system to permissive at runtime. A separate comparison is `setenforce 1`: setenforce 1 restores runtime enforcing behavior where SELinux is enabled. The stated task is to change selinux to permissive for this running session. Instead, `setenforce 0` is the relevant alternative because setenforce 0 changes a currently enabled SELinux system to permissive at runtime.
Question 1116
A RHEL 10 web-content directory /srv/web00 is subject to SELinux policy. The administrator must show current selinux labels of files in a directory. Which command performs that action?
- semanage fcontext -a -t httpd_sys_content_t "/srv/web00(/.*)?"
- restorecon -Rv /srv/web00
- matchpathcon /srv/web00
- ls -Z /srv/web00
Explanation
Correct Answer
D:ls -Z displays the SELinux security context of listed filesystem objects It performs the requested label-management step. This matches the stated requirement to show current selinux labels of files in a directory. By contrast, the plausible alternative `semanage fcontext -a -t httpd_sys_content_t "/srv/web00(/.*)?"` has the effect: semanage fcontext records the default SELinux labeling rule for files under this path It reads or applies a different part of SELinux context management; that operation would not achieve the requested result.
Incorrect Answers
A:semanage fcontext records the default SELinux labeling rule for files under this path It reads or applies a different part of SELinux context management. The stated task is to show current selinux labels of files in a directory. Instead, `ls -Z /srv/web00` is the relevant alternative because ls -Z displays the SELinux security context of listed filesystem objects It performs the requested label-management step.
B:restorecon applies the policy-defined default labels to existing files and directories It reads or applies a different part of SELinux context management. The stated task is to show current selinux labels of files in a directory. Instead, `ls -Z /srv/web00` is the relevant alternative because ls -Z displays the SELinux security context of listed filesystem objects It performs the requested label-management step.
C:matchpathcon resolves the file-context policy entry for the named path It reads or applies a different part of SELinux context management. The stated task is to show current selinux labels of files in a directory. Instead, `ls -Z /srv/web00` is the relevant alternative because ls -Z displays the SELinux security context of listed filesystem objects It performs the requested label-management step.
Question 1117
A RHEL 10 web-content directory /srv/web01 is subject to SELinux policy. The administrator must check the expected default selinux context for a path. Which command performs that action?
- matchpathcon /srv/web01
- semanage fcontext -a -t httpd_sys_content_t "/srv/web01(/.*)?"
- restorecon -Rv /srv/web01
- ls -Z /srv/web01
Explanation
Correct Answer
A:matchpathcon resolves the file-context policy entry for the named path It performs the requested label-management step. This matches the stated requirement to check the expected default selinux context for a path. By contrast, the plausible alternative `semanage fcontext -a -t httpd_sys_content_t "/srv/web01(/.*)?"` has the effect: semanage fcontext records the default SELinux labeling rule for files under this path It reads or applies a different part of SELinux context management; that operation would not achieve the requested result.
Incorrect Answers
B:semanage fcontext records the default SELinux labeling rule for files under this path It reads or applies a different part of SELinux context management. The stated task is to check the expected default selinux context for a path. Instead, `matchpathcon /srv/web01` is the relevant alternative because matchpathcon resolves the file-context policy entry for the named path It performs the requested label-management step.
C:restorecon applies the policy-defined default labels to existing files and directories It reads or applies a different part of SELinux context management. The stated task is to check the expected default selinux context for a path. Instead, `matchpathcon /srv/web01` is the relevant alternative because matchpathcon resolves the file-context policy entry for the named path It performs the requested label-management step.
D:ls -Z displays the SELinux security context of listed filesystem objects It reads or applies a different part of SELinux context management. The stated task is to check the expected default selinux context for a path. Instead, `matchpathcon /srv/web01` is the relevant alternative because matchpathcon resolves the file-context policy entry for the named path It performs the requested label-management step.
Question 1118
A RHEL 10 web-content directory /srv/web02 is subject to SELinux policy. The administrator must show current selinux labels of files in a directory. Which command performs that action?
- semanage fcontext -a -t httpd_sys_content_t "/srv/web02(/.*)?"
- ls -Z /srv/web02
- restorecon -Rv /srv/web02
- matchpathcon /srv/web02
Explanation
Correct Answer
B:ls -Z displays the SELinux security context of listed filesystem objects It performs the requested label-management step. This matches the stated requirement to show current selinux labels of files in a directory. By contrast, the plausible alternative `semanage fcontext -a -t httpd_sys_content_t "/srv/web02(/.*)?"` has the effect: semanage fcontext records the default SELinux labeling rule for files under this path It reads or applies a different part of SELinux context management; that operation would not achieve the requested result.
Incorrect Answers
A:semanage fcontext records the default SELinux labeling rule for files under this path It reads or applies a different part of SELinux context management. The stated task is to show current selinux labels of files in a directory. Instead, `ls -Z /srv/web02` is the relevant alternative because ls -Z displays the SELinux security context of listed filesystem objects It performs the requested label-management step.
C:restorecon applies the policy-defined default labels to existing files and directories It reads or applies a different part of SELinux context management. The stated task is to show current selinux labels of files in a directory. Instead, `ls -Z /srv/web02` is the relevant alternative because ls -Z displays the SELinux security context of listed filesystem objects It performs the requested label-management step.
D:matchpathcon resolves the file-context policy entry for the named path It reads or applies a different part of SELinux context management. The stated task is to show current selinux labels of files in a directory. Instead, `ls -Z /srv/web02` is the relevant alternative because ls -Z displays the SELinux security context of listed filesystem objects It performs the requested label-management step.
Question 1119
A RHEL 10 web-content directory /srv/web03 is subject to SELinux policy. The administrator must check the expected default selinux context for a path. Which command performs that action?
- semanage fcontext -a -t httpd_sys_content_t "/srv/web03(/.*)?"
- restorecon -Rv /srv/web03
- matchpathcon /srv/web03
- ls -Z /srv/web03
Explanation
Correct Answer
C:matchpathcon resolves the file-context policy entry for the named path It performs the requested label-management step. This matches the stated requirement to check the expected default selinux context for a path. By contrast, the plausible alternative `restorecon -Rv /srv/web03` has the effect: restorecon applies the policy-defined default labels to existing files and directories It reads or applies a different part of SELinux context management; that operation would not achieve the requested result.
Incorrect Answers
A:semanage fcontext records the default SELinux labeling rule for files under this path It reads or applies a different part of SELinux context management. The stated task is to check the expected default selinux context for a path. Instead, `matchpathcon /srv/web03` is the relevant alternative because matchpathcon resolves the file-context policy entry for the named path It performs the requested label-management step.
B:restorecon applies the policy-defined default labels to existing files and directories It reads or applies a different part of SELinux context management. The stated task is to check the expected default selinux context for a path. Instead, `matchpathcon /srv/web03` is the relevant alternative because matchpathcon resolves the file-context policy entry for the named path It performs the requested label-management step.
D:ls -Z displays the SELinux security context of listed filesystem objects It reads or applies a different part of SELinux context management. The stated task is to check the expected default selinux context for a path. Instead, `matchpathcon /srv/web03` is the relevant alternative because matchpathcon resolves the file-context policy entry for the named path It performs the requested label-management step.
Question 1120
A RHEL 10 web-content directory /srv/web04 is subject to SELinux policy. The administrator must apply a previously defined default file context recursively. Which command performs that action?
- semanage fcontext -a -t httpd_sys_content_t "/srv/web04(/.*)?"
- ls -Z /srv/web04
- matchpathcon /srv/web04
- restorecon -Rv /srv/web04
Explanation
Correct Answer
D:restorecon applies the policy-defined default labels to existing files and directories It performs the requested label-management step. This matches the stated requirement to apply a previously defined default file context recursively. By contrast, the plausible alternative `ls -Z /srv/web04` has the effect: ls -Z displays the SELinux security context of listed filesystem objects It reads or applies a different part of SELinux context management; that operation would not achieve the requested result.
Incorrect Answers
A:semanage fcontext records the default SELinux labeling rule for files under this path It reads or applies a different part of SELinux context management. The stated task is to apply a previously defined default file context recursively. Instead, `restorecon -Rv /srv/web04` is the relevant alternative because restorecon applies the policy-defined default labels to existing files and directories It performs the requested label-management step.
B:ls -Z displays the SELinux security context of listed filesystem objects It reads or applies a different part of SELinux context management. The stated task is to apply a previously defined default file context recursively. Instead, `restorecon -Rv /srv/web04` is the relevant alternative because restorecon applies the policy-defined default labels to existing files and directories It performs the requested label-management step.
C:matchpathcon resolves the file-context policy entry for the named path It reads or applies a different part of SELinux context management. The stated task is to apply a previously defined default file context recursively. Instead, `restorecon -Rv /srv/web04` is the relevant alternative because restorecon applies the policy-defined default labels to existing files and directories It performs the requested label-management step.
Red Hat Certified System Administrator (RHCSA) (EX200) Practice Tests