Question 160
The engineer proposes this implementation: Set the maximum password age with chage -M 90 username. The requirement is: A password policy requires local user passwords to expire after 90 days. Which technical explanation best supports the proposed action?
- The -a append modifier preserves the user's existing supplementary groups when -G changes membership.
- userdel removes the account records and -r also removes its home and mail spool where supported.
- useradd creates the account database entry, -m creates the initial home and -s selects the login shell.
- chage modifies password-aging policy stored with the account in the shadow database.
Explanation
Correct Answer
D:chage modifies password-aging policy stored with the account in the shadow database. It specifically supports the proposed action of Set the maximum password age with chage -M 90 username. for the requirement described.
Incorrect Answers
A:This explains another Linux operation, namely Use usermod -aG docker developer., where The -a append modifier preserves the user's existing supplementary groups when -G changes membership. It does not explain why Set the maximum password age with chage -M 90 username. satisfies the stated condition.
B:This explains another Linux operation, namely Run userdel -r oldsvc with the required permissions and backups., where userdel removes the account records and -r also removes its home and mail spool where supported. It does not explain why Set the maximum password age with chage -M 90 username. satisfies the stated condition.
C:This explains another Linux operation, namely Create the account with useradd -m -s /bin/bash employee and set its password., where useradd creates the account database entry, -m creates the initial home and -s selects the login shell. It does not explain why Set the maximum password age with chage -M 90 username. satisfies the stated condition.
Question 161
The action Set the maximum password age with chage -M 90 username. was applied for this goal: A password policy requires local user passwords to expire after 90 days. Which observation provides the most direct acceptance evidence?
- chage -l username shows the maximum password age set to 90 days.
- getent group appreaders returns the new group entry with its expected name.
- getent passwd svcname shows the configured nologin shell and service runtime can use the UID.
- A centrally managed user absent from /etc/passwd can still be resolved by getent passwd.
Explanation
Correct Answer
A:chage -l username shows the maximum password age set to 90 days. This checks the effect of Set the maximum password age with chage -M 90 username. against the stated operational goal.
Incorrect Answers
B:That observation checks A local application needs a dedicated group before administrators can assign its log readers. In this scenario it does not demonstrate Set the maximum password age with chage -M 90 username.; the relevant evidence must establish chage -l username shows the maximum password age set to 90 days.
C:That observation checks A daemon needs a low-privilege local system identity that normally should not be used for interactive login. In this scenario it does not demonstrate Set the maximum password age with chage -M 90 username.; the relevant evidence must establish chage -l username shows the maximum password age set to 90 days.
D:That observation checks An administrator needs to look up a user's account record using the configured NSS sources, not just local /etc/passwd. In this scenario it does not demonstrate Set the maximum password age with chage -M 90 username.; the relevant evidence must establish chage -l username shows the maximum password age set to 90 days.
Question 162
A team is validating its implementation of this requirement: A password policy requires local user passwords to expire after 90 days. Which observed mistake most specifically identifies that the intended manage user and group accounts and related system files behavior has NOT been met?
- grep /etc/passwd misses a centrally managed account that can authenticate.
- The policy was edited in an unrelated global file but the existing user's aging values did not change.
- The administrator changed the SHELL variable manually but login still launches the prior shell.
- A plain usermod -G docker developer replaced the entire supplementary group list.
Explanation
Correct Answer
B:The policy was edited in an unrelated global file but the existing user's aging values did not change. This shows the requested behavior is absent, so the deployment needs the correction: Apply chage to the target account and confirm the shadow aging fields.
Incorrect Answers
A:That symptom concerns An administrator needs to look up a user's account record using the configured NSS sources, not just local /etc/passwd. This concerns a separate requirement, not the one being tested. The relevant failure is The policy was edited in an unrelated global file but the existing user's aging values did not change. The current requirement calls for a different check.
C:That symptom concerns An account's interactive default shell must be changed without deleting or recreating the account. This concerns a separate requirement, not the one being tested. The relevant failure is The policy was edited in an unrelated global file but the existing user's aging values did not change. The current requirement calls for a different check.
D:That symptom concerns A developer must be added to the supplementary docker group without losing current secondary groups. This concerns a separate requirement, not the one being tested. The relevant failure is The policy was edited in an unrelated global file but the existing user's aging values did not change. The current requirement calls for a different check.
Question 163
During validation, this problem was found: The policy was edited in an unrelated global file but the existing user's aging values did not change. The original goal was: A password policy requires local user passwords to expire after 90 days. Which targeted correction best resolves it?
- Create the correct group first, then assign ownership and intended membership.
- Remove the approved residual home after ensuring it does not contain retained data.
- Apply chage to the target account and confirm the shadow aging fields.
- Change the account's configured login shell with usermod -s.
Explanation
Correct Answer
C:Apply chage to the target account and confirm the shadow aging fields. It directly addresses the observed symptom: The policy was edited in an unrelated global file but the existing user's aging values did not change. The relevant mechanism is chage modifies password-aging policy stored with the account in the shadow database.
Incorrect Answers
A:This fix is aimed at The directory has group ownership set to a non-existent group name. and would be relevant if A local application needs a dedicated group before administrators can assign its log readers. The incident instead states The policy was edited in an unrelated global file but the existing user's aging values did not change. and needs Apply chage to the target account and confirm the shadow aging fields.
B:This fix is aimed at The account disappears but the home remains because userdel ran without -r. and would be relevant if A former service account must be deleted along with its local home directory after approved retention checks. The incident instead states The policy was edited in an unrelated global file but the existing user's aging values did not change. and needs Apply chage to the target account and confirm the shadow aging fields.
D:This fix is aimed at The administrator changed the SHELL variable manually but login still launches the prior shell. and would be relevant if An account's interactive default shell must be changed without deleting or recreating the account. The incident instead states The policy was edited in an unrelated global file but the existing user's aging values did not change. and needs Apply chage to the target account and confirm the shadow aging fields.
Question 164
A Linux administrator faces this requirement: An administrator needs to look up a user's account record using the configured NSS sources, not just local /etc/passwd. Which specific action is the best direct solution?
- Set the maximum password age with chage -M 90 username.
- Create the account with useradd -m -s /bin/bash employee and set its password.
- Run id -gn username to display the account's primary group name.
- Run getent passwd username.
Explanation
Correct Answer
D:Run getent passwd username. The mechanism is: getent queries the name service switch databases, including configured directory sources where available.
Incorrect Answers
A:Set the maximum password age with chage -M 90 username. That operation is designed for the different case: A password policy requires local user passwords to expire after 90 days. It does not perform the specific action required here: Run getent passwd username.
B:Create the account with useradd -m -s /bin/bash employee and set its password. That operation is designed for the different case: A new employee needs a local Linux login, a home directory and the configured default shell. It does not perform the specific action required here: Run getent passwd username.
C:Run id -gn username to display the account's primary group name. That operation is designed for the different case: A technician wants to inspect which group is the primary group for a named account. It does not perform the specific action required here: Run getent passwd username.
Question 165
The engineer proposes this implementation: Run getent passwd username. The requirement is: An administrator needs to look up a user's account record using the configured NSS sources, not just local /etc/passwd. Which technical explanation best supports the proposed action?
- getent queries the name service switch databases, including configured directory sources where available.
- userdel removes the account records and -r also removes its home and mail spool where supported.
- The -n option changes the group name while retaining its numeric group identifier.
- chage modifies password-aging policy stored with the account in the shadow database.
Explanation
Correct Answer
A:getent queries the name service switch databases, including configured directory sources where available. It specifically supports the proposed action of Run getent passwd username. for the requirement described.
Incorrect Answers
B:This explains another Linux operation, namely Run userdel -r oldsvc with the required permissions and backups., where userdel removes the account records and -r also removes its home and mail spool where supported. It does not explain why Run getent passwd username. satisfies the stated condition.
C:This explains another Linux operation, namely Use groupmod -n newgroup oldgroup., where The -n option changes the group name while retaining its numeric group identifier. It does not explain why Run getent passwd username. satisfies the stated condition.
D:This explains another Linux operation, namely Set the maximum password age with chage -M 90 username., where chage modifies password-aging policy stored with the account in the shadow database. It does not explain why Run getent passwd username. satisfies the stated condition.
Question 166
The action Run getent passwd username. was applied for this goal: An administrator needs to look up a user's account record using the configured NSS sources, not just local /etc/passwd. Which observation provides the most direct acceptance evidence?
- chage -l username shows the maximum password age set to 90 days.
- A centrally managed user absent from /etc/passwd can still be resolved by getent passwd.
- getent group appreaders returns the new group entry with its expected name.
- The hash and aging fields are accessible only with appropriate privileges; /etc/passwd stores an x placeholder.
Explanation
Correct Answer
B:A centrally managed user absent from /etc/passwd can still be resolved by getent passwd. This checks the effect of Run getent passwd username. against the stated operational goal.
Incorrect Answers
A:That observation checks A password policy requires local user passwords to expire after 90 days. In this scenario it does not demonstrate Run getent passwd username.; the relevant evidence must establish A centrally managed user absent from /etc/passwd can still be resolved by getent passwd.
C:That observation checks A local application needs a dedicated group before administrators can assign its log readers. In this scenario it does not demonstrate Run getent passwd username.; the relevant evidence must establish A centrally managed user absent from /etc/passwd can still be resolved by getent passwd.
D:That observation checks An administrator needs to identify which file stores local password hashes rather than account names and shell paths. In this scenario it does not demonstrate Run getent passwd username.; the relevant evidence must establish A centrally managed user absent from /etc/passwd can still be resolved by getent passwd.
Question 167
A team is validating its implementation of this requirement: An administrator needs to look up a user's account record using the configured NSS sources, not just local /etc/passwd. Which observed mistake most specifically identifies that the intended manage user and group accounts and related system files behavior has NOT been met?
- A grep of supplementary memberships was mistaken for the account's primary group.
- The directory has group ownership set to a non-existent group name.
- grep /etc/passwd misses a centrally managed account that can authenticate.
- The account disappears but the home remains because userdel ran without -r.
Explanation
Correct Answer
C:grep /etc/passwd misses a centrally managed account that can authenticate. This shows the requested behavior is absent, so the deployment needs the correction: Query the NSS database through getent and verify name-service configuration.
Incorrect Answers
A:That symptom concerns A technician wants to inspect which group is the primary group for a named account. This concerns a separate requirement, not the one being tested. The relevant failure is grep /etc/passwd misses a centrally managed account that can authenticate. The current requirement calls for a different check.
B:That symptom concerns A local application needs a dedicated group before administrators can assign its log readers. This concerns a separate requirement, not the one being tested. The relevant failure is grep /etc/passwd misses a centrally managed account that can authenticate. The current requirement calls for a different check.
D:That symptom concerns A former service account must be deleted along with its local home directory after approved retention checks. This concerns a separate requirement, not the one being tested. The relevant failure is grep /etc/passwd misses a centrally managed account that can authenticate. The current requirement calls for a different check.
Question 168
During validation, this problem was found: grep /etc/passwd misses a centrally managed account that can authenticate. The original goal was: An administrator needs to look up a user's account record using the configured NSS sources, not just local /etc/passwd. Which targeted correction best resolves it?
- Create the home with correct ownership or recreate the account through a home-creating workflow.
- Apply chage to the target account and confirm the shadow aging fields.
- Rename the existing group with groupmod rather than creating an unrelated GID.
- Query the NSS database through getent and verify name-service configuration.
Explanation
Correct Answer
D:Query the NSS database through getent and verify name-service configuration. It directly addresses the observed symptom: grep /etc/passwd misses a centrally managed account that can authenticate. The relevant mechanism is getent queries the name service switch databases, including configured directory sources where available.
Incorrect Answers
A:This fix is aimed at The account exists in passwd but has no home directory because -m was omitted. and would be relevant if A new employee needs a local Linux login, a home directory and the configured default shell. The incident instead states grep /etc/passwd misses a centrally managed account that can authenticate. and needs Query the NSS database through getent and verify name-service configuration.
B:This fix is aimed at The policy was edited in an unrelated global file but the existing user's aging values did not change. and would be relevant if A password policy requires local user passwords to expire after 90 days. The incident instead states grep /etc/passwd misses a centrally managed account that can authenticate. and needs Query the NSS database through getent and verify name-service configuration.
C:This fix is aimed at A new group was created with a different GID, leaving files owned by the original group ID. and would be relevant if The operations team renamed a local Unix group without changing its existing numeric GID. The incident instead states grep /etc/passwd misses a centrally managed account that can authenticate. and needs Query the NSS database through getent and verify name-service configuration.
Question 169
A Linux administrator faces this requirement: A local application needs a dedicated group before administrators can assign its log readers. Which specific action is the best direct solution?
- Create the group with groupadd appreaders.
- Inspect the protected /etc/shadow database under appropriate privileges.
- Use usermod -s /bin/bash username for an installed permitted shell.
- Lock the account password with passwd -l employee and separately assess other authentication paths.
Explanation
Correct Answer
A:Create the group with groupadd appreaders. The mechanism is: groupadd creates the group in the local group database so members and file ownership can refer to it.
Incorrect Answers
B:Inspect the protected /etc/shadow database under appropriate privileges. That operation is designed for the different case: An administrator needs to identify which file stores local password hashes rather than account names and shell paths. It does not perform the specific action required here: Create the group with groupadd appreaders.
C:Use usermod -s /bin/bash username for an installed permitted shell. That operation is designed for the different case: An account's interactive default shell must be changed without deleting or recreating the account. It does not perform the specific action required here: Create the group with groupadd appreaders.
D:Lock the account password with passwd -l employee and separately assess other authentication paths. That operation is designed for the different case: A departing employee's interactive password login must be locked immediately while preserving account files for investigation. It does not perform the specific action required here: Create the group with groupadd appreaders.
Question 170
The engineer proposes this implementation: Create the group with groupadd appreaders. The requirement is: A local application needs a dedicated group before administrators can assign its log readers. Which technical explanation best supports the proposed action?
- userdel removes the account records and -r also removes its home and mail spool where supported.
- groupadd creates the group in the local group database so members and file ownership can refer to it.
- passwd -l prefixes the stored password hash with an invalid marker; it does not by itself disable SSH public-key or other authentication.
- chage modifies password-aging policy stored with the account in the shadow database.
Explanation
Correct Answer
B:groupadd creates the group in the local group database so members and file ownership can refer to it. It specifically supports the proposed action of Create the group with groupadd appreaders. for the requirement described.
Incorrect Answers
A:This explains another Linux operation, namely Run userdel -r oldsvc with the required permissions and backups., where userdel removes the account records and -r also removes its home and mail spool where supported. It does not explain why Create the group with groupadd appreaders. satisfies the stated condition.
C:This explains another Linux operation, namely Lock the account password with passwd -l employee and separately assess other authentication paths., where passwd -l prefixes the stored password hash with an invalid marker; it does not by itself disable SSH public-key or other authentication. It does not explain why Create the group with groupadd appreaders. satisfies the stated condition.
D:This explains another Linux operation, namely Set the maximum password age with chage -M 90 username., where chage modifies password-aging policy stored with the account in the shadow database. It does not explain why Create the group with groupadd appreaders. satisfies the stated condition.
LPI Level 1 (102-500) Practice Tests