LPI 102-500 Practice Test 65
Question 640
A helpdesk escalation describes this Linux behavior: A technician attempts to copy password hash fields into `/etc/passwd` to simplify account synchronization between two systems. Which TWO complementary steps provide the best corrective action and its most direct diagnostic verification? Select TWO answers.
- Run `visudo -c`, inspect `/etc/sudoers` and `/etc/sudoers.d`, and use a controlled `sudo -l` test as the affected account.
- Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy.
- Inspect `stat /etc/shadow`, attempt an unprivileged read, verify accounts through supported tools and review any unauthorized disclosure impact.
- Make `/etc/shadow` readable by all users and place password hashes into `/etc/passwd` because hashed values are harmless to disclose.
- Restore restricted shadow database ownership and permissions using distribution-supported account tools and protect password hashes from general reads.
Explanation
Correct Answers
C:Most direct verification evidence: Inspect `stat /etc/shadow`, attempt an unprivileged read, verify accounts through supported tools and review any unauthorized disclosure impact. Linux principle: /etc/shadow exists to separate sensitive hashed password and aging data from the broadly readable identity fields of /etc/passwd.
E:Recommended administrative action: Restore restricted shadow database ownership and permissions using distribution-supported account tools and protect password hashes from general reads. Linux principle: /etc/shadow exists to separate sensitive hashed password and aging data from the broadly readable identity fields of /etc/passwd.
Incorrect Answers
A:This alternative addresses Sudoers least privilege and safe editing, not the specific issue of Shadow password file permissions and hash protection: Run `visudo -c`, inspect `/etc/sudoers` and `/etc/sudoers.d`, and use a controlled `sudo -l` test as the affected account.
B:That option would identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy, but it addresses a different concern. /etc/shadow exists to separate sensitive hashed password and aging data from the broadly readable identity fields of /etc/passwd.
D:This shortcut is unsafe for the present Linux issue: Make `/etc/shadow` readable by all users and place password hashes into `/etc/passwd` because hashed values are harmless to disclose. /etc/shadow exists to separate sensitive hashed password and aging data from the broadly readable identity fields of /etc/passwd.
Question 641
An operations handoff identifies this problem: A legacy file-transfer service keeps accepting new connections despite its .service unit being stopped because its socket unit remains active. Which administrative step is the MOST appropriate way to resolve this issue? Select ONE best answer.
- Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy.
- Verify host-key fingerprints through a trusted channel and provision distinct server host keys for each machine, updating client trust only after authorized verification.
- Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon.
- Use `who`, `w` and `last` to distinguish active from historical logins and apply appropriate shell or PAM resource limits with ulimit and policy.
Explanation
Correct Answer
A:Recommended administrative action: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. service unit being stopped because its socket unit remains active.
Incorrect Answers
B:That option would verify host-key fingerprints through a trusted channel and provision distinct server host keys for each machine, updating client trust only after authorized verification, but it addresses a different concern. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
C:That option would assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon, but it addresses a different concern. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
D:That option would use `who`, `w` and `last` to distinguish active from historical logins and apply appropriate shell or PAM resource limits with ulimit and policy, but it addresses a different concern. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
Question 642
A team maintaining a Linux host reports: A legacy file-transfer service keeps accepting new connections despite its .service unit being stopped because its socket unit remains active. Which Linux behavior or technical principle BEST explains why the issue occurs? Select ONE best answer.
- SSH server host keys identify the remote server and protect against impersonation; host keys are different from user public-key authentication keys.
- Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon.
- Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
- SSH tunnels securely carry selected traffic over an authenticated SSH connection; local `-L` forwards TCP endpoints, while `-X` supports the separate X11 application model.
Explanation
Correct Answer
C:Relevant Linux operating principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running. service unit being stopped because its socket unit remains active.
Incorrect Answers
A:This alternative addresses SSH server host keys and client trust decisions, not the specific issue of Disabling unnecessary systemd and socket-activated services: SSH server host keys identify the remote server and protect against impersonation; host keys are different from user public-key authentication keys. service unit being stopped because its socket unit remains active. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running. Appropriate response: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. Root-cause evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. Independent acceptance: The unwanted port no longer accepts connections after reboot while approved system services remain available.
B:This shortcut is unsafe for the present Linux issue: Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
D:This alternative addresses SSH port forwarding and X11 tunnel purpose, not the specific issue of Disabling unnecessary systemd and socket-activated services: SSH tunnels securely carry selected traffic over an authenticated SSH connection; local `-L` forwards TCP endpoints, while `-X` supports the separate X11 application model. service unit being stopped because its socket unit remains active. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running. Appropriate response: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. Root-cause evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. Independent acceptance: The unwanted port no longer accepts connections after reboot while approved system services remain available.
Question 643
While verifying a Linux change request, an engineer finds: A legacy file-transfer service keeps accepting new connections despite its .service unit being stopped because its socket unit remains active. Which evidence or command result MOST directly tests the suspected root cause? Select ONE best answer.
- Run carefully scoped `find` checks for -perm -4000 and -perm -2000, review file ownership, ACLs, package provenance and intended use.
- Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon.
- Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt.
- Inspect key file permissions, the authorized_keys contents, ssh -v authentication trace and `ssh-add -l` for an intended agent.
Explanation
Correct Answer
C:Most direct verification evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. service unit being stopped because its socket unit remains active.
Incorrect Answers
A:That option would run carefully scoped `find` checks for -perm -4000 and -perm -2000, review file ownership, ACLs, package provenance and intended use, but it addresses a different concern. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
B:This shortcut is unsafe for the present Linux issue: Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon. It cannot establish a safe correction. service unit being stopped because its socket unit remains active.
D:That option would inspect key file permissions, the authorized_keys contents, ssh -v authentication trace and `ssh-add -l` for an intended agent, but it addresses a different concern. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
Question 644
A Linux administrator investigates the following system incident: A legacy file-transfer service keeps accepting new connections despite its .service unit being stopped because its socket unit remains active. Which observed outcome BEST confirms a successful and properly scoped correction? Select ONE best answer.
- Authorized users authenticate with their own protected private keys and the remote host contains no copied private credential.
- The user can perform only the authorized command and sudo policy remains syntactically valid with denied unrelated operations.
- Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon.
- The unwanted port no longer accepts connections after reboot while approved system services remain available.
Explanation
Correct Answer
D:Observable acceptance criterion: The unwanted port no longer accepts connections after reboot while approved system services remain available. service unit being stopped because its socket unit remains active.
Incorrect Answers
A:This alternative addresses SSH user keys, authorized_keys and agent handling, not the specific issue of Disabling unnecessary systemd and socket-activated services: Authorized users authenticate with their own protected private keys and the remote host contains no copied private credential. service unit being stopped because its socket unit remains active. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running. Appropriate response: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. Root-cause evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. Independent acceptance: The unwanted port no longer accepts connections after reboot while approved system services remain available.
B:This alternative addresses Sudoers least privilege and safe editing, not the specific issue of Disabling unnecessary systemd and socket-activated services: The user can perform only the authorized command and sudo policy remains syntactically valid with denied unrelated operations. service unit being stopped because its socket unit remains active. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running. Appropriate response: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. Root-cause evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. Independent acceptance: The unwanted port no longer accepts connections after reboot while approved system services remain available.
C:This shortcut is unsafe for the present Linux issue: Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon. It cannot establish a safe correction. service unit being stopped because its socket unit remains active. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
Question 645
On a production Linux workstation or server, a technician observes: A legacy file-transfer service keeps accepting new connections despite its .service unit being stopped because its socket unit remains active. Which misleading assumption MOST directly contributes to this failure and should be rejected? Select ONE best answer.
- Use `ALL=(ALL) NOPASSWD: ALL` for every support user and edit sudoers blindly with no syntax validation.
- Copy the private SSH key to authorized_keys on the server and make both key files world-readable to reduce login errors.
- Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon.
- Assume any text written to /etc/hosts.deny automatically filters every new TCP listener on modern Linux hosts.
Explanation
Correct Answer
C:Reject this specific misconception: Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon. It incorrectly assumes behavior that conflicts with the observed Linux conditions.
Incorrect Answers
A:That option would use `ALL=(ALL) NOPASSWD: ALL` for every support user and edit sudoers blindly with no syntax validation, but it addresses a different concern. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
B:This alternative addresses SSH user keys, authorized_keys and agent handling, not the specific issue of Disabling unnecessary systemd and socket-activated services: Copy the private SSH key to authorized_keys on the server and make both key files world-readable to reduce login errors. service unit being stopped because its socket unit remains active. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running. Appropriate response: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. Root-cause evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. Independent acceptance: The unwanted port no longer accepts connections after reboot while approved system services remain available.
D:That option would assume any text written to /etc/hosts.deny automatically filters every new TCP listener on modern Linux hosts, but it addresses a different concern. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
Question 646
During an LPIC-1 practice lab, the operator encounters this condition: A workstation exposes a remote management daemon that is no longer needed but the operator removes only its desktop shortcut. Which administrative step is the MOST appropriate way to resolve this issue? Select ONE best answer.
- Grant narrowly scoped sudo privileges using visudo or a validated sudoers.d fragment, then test as the intended identity.
- Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon.
- Use GPG public-key encryption for confidentiality, private-key signatures for authenticity and proper revocation or verification for compromised or expired keys.
- Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy.
Explanation
Correct Answer
D:Recommended administrative action: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
Incorrect Answers
A:That option would grant narrowly scoped sudo privileges using visudo or a validated sudoers.d fragment, then test as the intended identity, but it addresses a different concern. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
B:This shortcut is unsafe for the present Linux issue: Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
C:That option would use GPG public-key encryption for confidentiality, private-key signatures for authenticity and proper revocation or verification for compromised or expired keys, but it addresses a different concern. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
Question 647
A helpdesk escalation describes this Linux behavior: A workstation exposes a remote management daemon that is no longer needed but the operator removes only its desktop shortcut. Which Linux behavior or technical principle BEST explains why the issue occurs? Select ONE best answer.
- Public keys can authorize remote login while the private key remains secret; agent software can hold usable key identities without copying secrets to remote hosts.
- Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
- Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon.
- Encryption protects content for holders of the corresponding decryption key, whereas a digital signature demonstrates origin and integrity without concealing the data.
Explanation
Correct Answer
B:Relevant Linux operating principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
Incorrect Answers
A:This alternative addresses SSH user keys, authorized_keys and agent handling, not the specific issue of Disabling unnecessary systemd and socket-activated services: Public keys can authorize remote login while the private key remains secret; agent software can hold usable key identities without copying secrets to remote hosts. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running. Appropriate response: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. Root-cause evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. Independent acceptance: The unwanted port no longer accepts connections after reboot while approved system services remain available.
C:This shortcut is unsafe for the present Linux issue: Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon. It cannot establish a safe correction. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
D:This alternative addresses GnuPG signing versus encryption and key revocation, not the specific issue of Disabling unnecessary systemd and socket-activated services: Encryption protects content for holders of the corresponding decryption key, whereas a digital signature demonstrates origin and integrity without concealing the data. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running. Appropriate response: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. Root-cause evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. Independent acceptance: The unwanted port no longer accepts connections after reboot while approved system services remain available.
Question 648
An operations handoff identifies this problem: A workstation exposes a remote management daemon that is no longer needed but the operator removes only its desktop shortcut. Which evidence or command result MOST directly tests the suspected root cause? Select ONE best answer.
- Run carefully scoped `find` checks for -perm -4000 and -perm -2000, review file ownership, ACLs, package provenance and intended use.
- Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt.
- Inspect SSH `-L` or `-X` options, effective local bind addresses, target service reachability and both endpoint access controls.
- Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon.
Explanation
Correct Answer
B:Most direct verification evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
Incorrect Answers
A:This alternative addresses Auditing privileged SUID and SGID executables, not the specific issue of Disabling unnecessary systemd and socket-activated services: Run carefully scoped `find` checks for -perm -4000 and -perm -2000, review file ownership, ACLs, package provenance and intended use.
C:That option would inspect SSH `-L` or `-X` options, effective local bind addresses, target service reachability and both endpoint access controls, but it addresses a different concern. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
D:This shortcut is unsafe for the present Linux issue: Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon. It cannot establish a safe correction. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running. Appropriate response: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. Root-cause evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. Independent acceptance: The unwanted port no longer accepts connections after reboot while approved system services remain available.
Question 649
A team maintaining a Linux host reports: A workstation exposes a remote management daemon that is no longer needed but the operator removes only its desktop shortcut. Which observed outcome BEST confirms a successful and properly scoped correction? Select ONE best answer.
- Authorized recipients can decrypt protected content and independent verifiers can validate valid signatures or reject revoked keys.
- Authorized users authenticate with their own protected private keys and the remote host contains no copied private credential.
- The unwanted port no longer accepts connections after reboot while approved system services remain available.
- Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon.
Explanation
Correct Answer
C:Observable acceptance criterion: The unwanted port no longer accepts connections after reboot while approved system services remain available. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
Incorrect Answers
A:This alternative addresses GnuPG signing versus encryption and key revocation, not the specific issue of Disabling unnecessary systemd and socket-activated services: Authorized recipients can decrypt protected content and independent verifiers can validate valid signatures or reject revoked keys. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running. Appropriate response: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. Root-cause evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. Independent acceptance: The unwanted port no longer accepts connections after reboot while approved system services remain available.
B:This alternative addresses SSH user keys, authorized_keys and agent handling, not the specific issue of Disabling unnecessary systemd and socket-activated services: Authorized users authenticate with their own protected private keys and the remote host contains no copied private credential. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running. Appropriate response: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. Root-cause evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. Independent acceptance: The unwanted port no longer accepts connections after reboot while approved system services remain available.
D:This shortcut is unsafe for the present Linux issue: Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
Question 650
While verifying a Linux change request, an engineer finds: A workstation exposes a remote management daemon that is no longer needed but the operator removes only its desktop shortcut. Which TWO complementary steps provide the best corrective action and its most direct diagnostic verification? Select TWO answers.
- Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy.
- Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt.
- Grant narrowly scoped sudo privileges using visudo or a validated sudoers.d fragment, then test as the intended identity.
- Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon.
- Compare server host key fingerprint to an approved inventory, inspect /etc/ssh/ssh_host_* files and examine the user's known_hosts entry.
Explanation
Correct Answers
A:Recommended administrative action: Identify the listening service and any associated systemd .socket activation unit, then disable or mask unnecessary network entry points according to policy. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
B:Most direct verification evidence: Inspect `systemctl list-sockets`, service and socket unit states, live listeners and a controlled remote connection attempt. Linux principle: Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
Incorrect Answers
C:This alternative addresses Sudoers least privilege and safe editing, not the specific issue of Disabling unnecessary systemd and socket-activated services: Grant narrowly scoped sudo privileges using visudo or a validated sudoers.d fragment, then test as the intended identity.
D:This shortcut is unsafe for the present Linux issue: Assume `systemctl stop old.service` always removes every socket-activated listener and that hiding an application shortcut disables its daemon. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.
E:That option would compare server host key fingerprint to an approved inventory, inspect /etc/ssh/ssh_host_* files and examine the user's known_hosts entry, but it addresses a different concern. Systemd socket activation can create listeners and start services on demand even when the associated service process is not currently running.