Question 1090
An auditor on RHEL 10 needs to display the user identifier and group identifiers for an account. The named account is consult04, and the group is lab04 where relevant. Which command gives that evidence?
- getent passwd consult04
- id consult04
- getent group lab04
- grep "^consult04:" /etc/passwd
Explanation
Correct Answer
B:id prints account UID and primary/supplementary group identifiers This reports the requested account/group evidence.
Incorrect Answers
A:getent passwd resolves the account through configured passwd databases It reports a different identity, scope, or name-service source. The stated task is to display the user identifier and group identifiers for an account. Instead, `id consult04` is the relevant alternative because id prints account UID and primary/supplementary group identifiers This reports the requested account/group evidence.
C:getent group checks local or configured group name-service records It reports a different identity, scope, or name-service source. The stated task is to display the user identifier and group identifiers for an account. Instead, `id consult04` is the relevant alternative because id prints account UID and primary/supplementary group identifiers This reports the requested account/group evidence.
D:grep on /etc/passwd reads that local file specifically, rather than all NSS data sources It reports a different identity, scope, or name-service source. The stated task is to display the user identifier and group identifiers for an account. Instead, `id consult04` is the relevant alternative because id prints account UID and primary/supplementary group identifiers This reports the requested account/group evidence.
Question 1091
An auditor on RHEL 10 needs to look up an account through the name-service switch. The named account is consult05, and the group is lab05 where relevant. Which command gives that evidence?
- id consult05
- getent group lab05
- getent passwd consult05
- grep "^consult05:" /etc/passwd
Explanation
Correct Answer
C:getent passwd resolves the account through configured passwd databases This reports the requested account/group evidence. This matches the stated requirement to look up an account through the name-service switch. By contrast, the plausible alternative `id consult05` has the effect: id prints account UID and primary/supplementary group identifiers It reports a different identity, scope, or name-service source; that operation would not achieve the requested result.
Incorrect Answers
A:id prints account UID and primary/supplementary group identifiers It reports a different identity, scope, or name-service source. The stated task is to look up an account through the name-service switch. Instead, `getent passwd consult05` is the relevant alternative because getent passwd resolves the account through configured passwd databases This reports the requested account/group evidence.
B:getent group checks local or configured group name-service records It reports a different identity, scope, or name-service source. The stated task is to look up an account through the name-service switch. Instead, `getent passwd consult05` is the relevant alternative because getent passwd resolves the account through configured passwd databases This reports the requested account/group evidence.
D:grep on /etc/passwd reads that local file specifically, rather than all NSS data sources It reports a different identity, scope, or name-service source. The stated task is to look up an account through the name-service switch. Instead, `getent passwd consult05` is the relevant alternative because getent passwd resolves the account through configured passwd databases This reports the requested account/group evidence.
Question 1092
An auditor on RHEL 10 needs to show the local passwd database record directly. The named account is consult06, and the group is lab06 where relevant. Which command gives that evidence?
- id consult06
- getent passwd consult06
- getent group lab06
- grep "^consult06:" /etc/passwd
Explanation
Correct Answer
D:grep on /etc/passwd reads that local file specifically, rather than all NSS data sources This reports the requested account/group evidence. This matches the stated requirement to show the local passwd database record directly. By contrast, the plausible alternative `getent passwd consult06` has the effect: getent passwd resolves the account through configured passwd databases It reports a different identity, scope, or name-service source; that operation would not achieve the requested result.
Incorrect Answers
A:id prints account UID and primary/supplementary group identifiers It reports a different identity, scope, or name-service source. The stated task is to show the local passwd database record directly. Instead, `grep "^consult06:" /etc/passwd` is the relevant alternative because grep on /etc/passwd reads that local file specifically, rather than all NSS data sources This reports the requested account/group evidence.
B:getent passwd resolves the account through configured passwd databases It reports a different identity, scope, or name-service source. The stated task is to show the local passwd database record directly. Instead, `grep "^consult06:" /etc/passwd` is the relevant alternative because grep on /etc/passwd reads that local file specifically, rather than all NSS data sources This reports the requested account/group evidence.
C:getent group checks local or configured group name-service records It reports a different identity, scope, or name-service source. The stated task is to show the local passwd database record directly. Instead, `grep "^consult06:" /etc/passwd` is the relevant alternative because grep on /etc/passwd reads that local file specifically, rather than all NSS data sources This reports the requested account/group evidence.
Question 1093
An auditor on RHEL 10 needs to look up an account through the name-service switch. The named account is consult07, and the group is lab07 where relevant. A review considers `id consult07` as an alternative. Its relevant behavior is: id prints account UID and primary/supplementary group identifiers. That is a different result from the requested operation. Which listed command satisfies the original requirement without substituting this other behavior?
- getent passwd consult07
- id consult07
- getent group lab07
- grep "^consult07:" /etc/passwd
Explanation
Correct Answer
A:getent passwd resolves the account through configured passwd databases This reports the requested account/group evidence. This matches the stated requirement to look up an account through the name-service switch. By contrast, the plausible alternative `getent group lab07` has the effect: getent group checks local or configured group name-service records It reports a different identity, scope, or name-service source; that operation would not achieve the requested result.
Incorrect Answers
B:id prints account UID and primary/supplementary group identifiers It reports a different identity, scope, or name-service source. The stated task is to look up an account through the name-service switch. Instead, `getent passwd consult07` is the relevant alternative because getent passwd resolves the account through configured passwd databases This reports the requested account/group evidence.
C:getent group checks local or configured group name-service records It reports a different identity, scope, or name-service source. The stated task is to look up an account through the name-service switch. Instead, `getent passwd consult07` is the relevant alternative because getent passwd resolves the account through configured passwd databases This reports the requested account/group evidence.
D:grep on /etc/passwd reads that local file specifically, rather than all NSS data sources It reports a different identity, scope, or name-service source. The stated task is to look up an account through the name-service switch. Instead, `getent passwd consult07` is the relevant alternative because getent passwd resolves the account through configured passwd databases This reports the requested account/group evidence.
Question 1094
An auditor on RHEL 10 needs to look up a group through the name-service switch. The named account is consult08, and the group is lab08 where relevant. A review considers `getent passwd consult08` as an alternative. Its relevant behavior is: getent passwd resolves the account through configured passwd databases. That is a different result from the requested operation. Which listed command satisfies the original requirement without substituting this other behavior?
- id consult08
- getent group lab08
- getent passwd consult08
- grep "^consult08:" /etc/passwd
Explanation
Correct Answer
B:getent group checks local or configured group name-service records This reports the requested account/group evidence. This matches the stated requirement to look up a group through the name-service switch. By contrast, the plausible alternative `getent passwd consult08` has the effect: getent passwd resolves the account through configured passwd databases It reports a different identity, scope, or name-service source; that operation would not achieve the requested result.
Incorrect Answers
A:id prints account UID and primary/supplementary group identifiers It reports a different identity, scope, or name-service source. The stated task is to look up a group through the name-service switch. Instead, `getent group lab08` is the relevant alternative because getent group checks local or configured group name-service records This reports the requested account/group evidence.
C:getent passwd resolves the account through configured passwd databases It reports a different identity, scope, or name-service source. The stated task is to look up a group through the name-service switch. Instead, `getent group lab08` is the relevant alternative because getent group checks local or configured group name-service records This reports the requested account/group evidence.
D:grep on /etc/passwd reads that local file specifically, rather than all NSS data sources It reports a different identity, scope, or name-service source. The stated task is to look up a group through the name-service switch. Instead, `getent group lab08` is the relevant alternative because getent group checks local or configured group name-service records This reports the requested account/group evidence.
Question 1095
An auditor on RHEL 10 needs to look up an account through the name-service switch. The named account is consult09, and the group is lab09 where relevant. A review considers `getent group lab09` as an alternative. Its relevant behavior is: getent group checks local or configured group name-service records. That is a different result from the requested operation. Which listed command satisfies the original requirement without substituting this other behavior?
- id consult09
- getent group lab09
- getent passwd consult09
- grep "^consult09:" /etc/passwd
Explanation
Correct Answer
C:getent passwd resolves the account through configured passwd databases This reports the requested account/group evidence. This matches the stated requirement to look up an account through the name-service switch. By contrast, the plausible alternative `grep "^consult09:" /etc/passwd` has the effect: grep on /etc/passwd reads that local file specifically, rather than all NSS data sources It reports a different identity, scope, or name-service source; that operation would not achieve the requested result.
Incorrect Answers
A:id prints account UID and primary/supplementary group identifiers It reports a different identity, scope, or name-service source. The stated task is to look up an account through the name-service switch. Instead, `getent passwd consult09` is the relevant alternative because getent passwd resolves the account through configured passwd databases This reports the requested account/group evidence.
B:getent group checks local or configured group name-service records It reports a different identity, scope, or name-service source. The stated task is to look up an account through the name-service switch. Instead, `getent passwd consult09` is the relevant alternative because getent passwd resolves the account through configured passwd databases This reports the requested account/group evidence.
D:grep on /etc/passwd reads that local file specifically, rather than all NSS data sources It reports a different identity, scope, or name-service source. The stated task is to look up an account through the name-service switch. Instead, `getent passwd consult09` is the relevant alternative because getent passwd resolves the account through configured passwd databases This reports the requested account/group evidence.
Question 1096
On RHEL 10 host secure-00 with SELinux installed and enabled, an administrator must inspect configured and current selinux modes. Which command or configuration entry fits?
- getenforce
- setenforce 0
- setenforce 1
- sestatus
Explanation
Correct Answer
D: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.
Incorrect Answers
A: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.
B: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.
C: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.
Question 1097
On RHEL 10 host secure-01 with SELinux installed and enabled, an administrator must change the persistent selinux mode setting. Which command or configuration entry fits?
- SELINUX=enforcing
- getenforce
- setenforce 0
- setenforce 1
Explanation
Correct Answer
A:The /etc/selinux/config line SELINUX=enforcing sets the configured mode for future boot; it does not by itself switch the running mode. This matches the stated requirement to change the persistent selinux mode setting. 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.
Incorrect Answers
B:getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem. The stated task is to change the persistent selinux mode setting. Instead, `SELINUX=enforcing` is the relevant alternative because the /etc/selinux/config line SELINUX=enforcing sets the configured mode for future boot; it does not by itself switch the running mode.
C:setenforce 0 changes a currently enabled SELinux system to permissive at runtime. The stated task is to change the persistent selinux mode setting. Instead, `SELINUX=enforcing` is the relevant alternative because the /etc/selinux/config line SELINUX=enforcing sets the configured mode for future boot; it does not by itself switch the running mode.
D:setenforce 1 restores runtime enforcing behavior where SELinux is enabled. The stated task is to change the persistent selinux mode setting. Instead, `SELINUX=enforcing` is the relevant alternative because the /etc/selinux/config line SELINUX=enforcing sets the configured mode for future boot; it does not by itself switch the running mode.
Question 1098
On RHEL 10 host secure-02 with SELinux installed and enabled, an administrator must change selinux to permissive for this running session. Which command or configuration entry fits?
- 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 `getenforce` has the effect: getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem; 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 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.
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.
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.
Question 1099
On RHEL 10 host secure-03 with SELinux installed and enabled, an administrator must return a permissive selinux system to enforcing now. Which command or configuration entry fits?
- 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 `getenforce` has the effect: getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem; 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.
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.
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.
Question 1100
On RHEL 10 host secure-04 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
- sestatus
- setenforce 0
Explanation
Correct Answer
D: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 `getenforce` has the effect: getenforce reports Enforcing, Permissive or Disabled for the currently running SELinux subsystem; 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 `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.
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 `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.
C: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.
Red Hat Certified System Administrator (RHCSA) (EX200) Practice Tests