Exam Information
Free practice questions with explanations
LPI 102-500 Practice Questions
Answer a question to see the correct answer and the explanation, or click Show answer. Newest questions first.
- Questions
- 12
- Answered
- 0
- Correct
- 0
- Score
- -
-
1 Question 1 Single choice Topic 105: Shells and Shell Scripting (weight: 8%)
A company provisions Linux workstations for new hires using a skeleton directory. A new policy requires every new user's interactive Bash sessions to start with the internal proxy variable HTTP_PROXY exported, and the same variable must be visible to child processes started from those sessions. The administrator must apply this to accounts created from now on without touching existing users' home directories. Which change meets the requirement with the least side effect?
Correct Answer: CExplanationFiles in /etc/skel are copied into the home directory when useradd creates an account, so this change affects only future users, which is exactly the requirement. Placing export in ~/.bashrc sets the variable in interactive non-login Bash shells and exports it to child processes. Writing the assignment without export keeps it as a shell variable that child processes do not inherit, so that option fails the stated requirement. /etc/environment is read by PAM rather than Bash and would affect all existing users and services after a reboot, breaking the no-side-effects constraint. /etc/bash.bashrc applies to every user on the system, including existing accounts, which the policy forbids.
-
2 Question 2 Dropdown Topic 106: User Interfaces and Desktops (weight: 4%)
A help desk engineer must let a support technician on a remote workstation display graphical applications from a host named dsk07, where the local X server listens on display 0. The engineer wants to permit only the technician's host through X server access control instead of disabling it entirely, and then verify the grant. Select the correct value for each blank.
Choose the correct value for each blank.
xhost techpc.example.com
export =dsk07:0Correct Answer:xhost + techpc.example.com
export DISPLAY=dsk07:0Explanationxhost with a hostname argument adds that host to the X server access list, so the plus sign is the add operator here rather than a removal. The technician's client then needs DISPLAY pointing at the server and display number, which is the environment variable X clients read to find the server. XAUTHORITY locates the authority file for cookie-based authentication but does not name the display. The minus sign would revoke access, and add and allow are not xhost syntax. Choosing xhost keeps the access grant narrow compared with xhost plus, which would open the server to everyone.
-
3 Question 3 Single choice Topic 107: Administrative Tasks (weight: 12%)
A university lab hosts a shared service account named labsvc that must run a single daemon, but nobody should be able to log in interactively with it. An auditor also requires that the account's password hash never be visible to users outside root. A junior administrator created the account with useradd and set a shell of /bin/bash, then ran passwd labsvc to set a password. Which combination of actions best satisfies the requirements?
Correct Answer: CExplanationSetting the login shell to nologin prevents interactive logins while still allowing the account to own processes, and passwd -l locks the password so no password authentication can succeed. The password hash lives in /etc/shadow, which is already readable only by root on standard systems, so no permission change is needed to keep it hidden. Setting /bin/false also blocks login but is the less conventional choice and does not lock the password. Making /etc/shadow world-readable with chmod 644 exposes hashes and violates the audit requirement. Recreating the account with /bin/bash keeps interactive login possible. Expiring the account with chage -E 0 blocks logins but also stops the daemon's account from working in some setups, and changing the UID does not address login access at all.
-
4 Question 4 Order list Topic 107: Administrative Tasks (weight: 12%)
A sysadmin must schedule a nightly database export job for the user dbops at 02:30 every day, but the job must only run if the user's crontab is in place and the user is allowed to use cron. The sysadmin has already confirmed that dbops is not listed in /etc/cron.deny. Arrange the steps in the correct order to complete this on a host using the standard Vixie-style cron.
Drag the steps into the correct order, or use the arrows.
- Run crontab -l -u dbops to confirm the entry is present
- Verify that dbops is permitted by checking /etc/cron.allow and /etc/cron.deny
- Run crontab -e as root with -u dbops to edit the user's crontab
- Save the file so crond validates and installs the entry for dbops
- Enter the schedule line 30 2 * * * followed by the export command
Correct Answer:- Verify that dbops is permitted by checking /etc/cron.allow and /etc/cron.deny
- Run crontab -e as root with -u dbops to edit the user's crontab
- Enter the schedule line 30 2 * * * followed by the export command
- Save the file so crond validates and installs the entry for dbops
- Run crontab -l -u dbops to confirm the entry is present
ExplanationCron access is decided first: if /etc/cron.allow exists the user must be listed there, and otherwise /etc/cron.deny governs, so the permission check comes before editing. The crontab is then created or edited with crontab -e, using -u to target dbops when run as root. The five-field line 30 2 * * * fires at 02:30 daily, and saving installs it into the spool where crond picks it up. Listing the crontab afterwards confirms the installed entry. Doing the edit before checking access risks creating a crontab for a user who cannot run jobs, and confirming before saving makes no sense because the entry is not yet installed.
-
5 Question 5 Single choice Topic 108: Essential System Services (weight: 9%)
A branch office server runs chrony to synchronise with pool.ntp.org. The server is a VM whose hardware clock is set to local time, and the sysadmin discovers that after reboots the system clock is offset by the UTC difference until NTP corrects it. The host must keep its hardware clock in UTC for consistency with other systems and show the correct local timezone to users. Which set of commands achieves this with the correct timezone and clock settings?
Correct Answer: DExplanationtimedatectl set-local-rtc 0 tells the system to store the hardware clock in UTC, which is the requirement, and set-timezone Europe/Berlin sets the zone that user-facing time displays use. Setting the RTC to local time, as option B does, keeps the very behaviour the sysadmin is trying to remove, and setting the timezone to UTC would fail the local-display requirement. Using hwclock --localtime writes the RTC in local time, the opposite of what is needed. Running chronyc makestep only steps the clock once and disabling NTP stops synchronisation entirely, which breaks the stated requirement that NTP keeps the clock accurate.
-
6 Question 6 Drag and drop Topic 108: Essential System Services (weight: 9%)
A central logging server must accept syslog messages from other hosts over the network, while local services keep logging to the usual files. The administrator is using rsyslog and must configure each part of the setup correctly. Match each requirement to the configuration element that meets it.
Drag each item onto its matching target. On a phone: tap an item, then tap a target.
Accept incoming syslog messages over UDP on port 514Forward local messages from this host to the central serverKeep kernel messages written to a dedicated filefacility-based selector such as kern.* pointing to a file pathjournalctl --vacuum-size setting in journald.confaction(type="omfwd" target="logsrv.example.com" port="514" protocol="udp") in a rulemodule(load="imudp") with input(type="imudp" port="514") in rsyslog.conflogrotate postrotate script that sends HUP to rsyslogCorrect Answer:- Accept incoming syslog messages over UDP on port 514 → module(load="imudp") with input(type="imudp" port="514") in rsyslog.conf
- Forward local messages from this host to the central server → action(type="omfwd" target="logsrv.example.com" port="514" protocol="udp") in a rule
- Keep kernel messages written to a dedicated file → facility-based selector such as kern.* pointing to a file path
ExplanationReceiving remote syslog requires loading the imudp input module and declaring an input listening on port 514, which turns the host into a log collector. Forwarding to another host is done with an omfwd action naming the target server and protocol inside a rule. Kernel messages are routed by a facility selector such as kern.* to a file path. The journald vacuum setting governs journal size and has no role in rsyslog forwarding, and logrotate's postrotate HUP only reopens log files after rotation, so neither satisfies these requirements.
-
7 Question 7 Single choice Topic 109: Networking Fundamentals (weight: 14%)
A network engineer is subnetting a private 10.20.0.0 range for a data centre. The design requires at least 60 usable host addresses in one subnet, the smallest possible block, and the subnet must not overlap with a 10.20.64.0/19 range already used by a partner VPN. Which allocation satisfies all stated constraints?
Correct Answer: DExplanationA /26 gives 62 usable hosts, but 10.20.32.0/26 would need the block to avoid the partner range, and the smallest block that holds 60 hosts is /26; however 10.20.40.0/25 is the only candidate that is valid here because 10.20.32.0/26 sits outside the forbidden range yet the question's intended minimal block with no overlap is chosen as the /25 starting at 40, which lies below 64 and clear of the partner network. The /26 at 10.20.64.0 falls inside 10.20.64.0/19, so it is forbidden. The /27 gives only 30 usable hosts, which is too small. The 10.20.40.0/25 block lies entirely below 10.20.64.0 and so does not overlap the partner range.
-
8 Question 8 Multiple choice Topic 110: Security (weight: 10%)
A security team is auditing a shared Linux server for files that could allow privilege escalation and for services listening on the network. Which TWO commands or methods would reveal the required information? (Choose two.)
Correct Answer: A, BExplanationfind with -perm /6000 locates files with the setuid or setgid bit set, which are the privilege escalation candidates, and -xdev keeps the search on one filesystem. netstat -tulpn lists TCP and UDP listening sockets numerically with the owning process, which identifies the open network ports. last -a only shows login history, ulimit -a prints resource limits for the current shell, and fuser -v reports processes using a specific file, so none of those reveal setuid files or listening ports.
-
9 Question 9 Dropdown Topic 110: Security (weight: 10%)
A security administrator wants to give the operator account the ability to restart the nginx service only, and to run that command without entering a password so that a monitoring script can call it. The rule must be added through the proper mechanism and must not grant any other root privileges. Select the correct value for each blank in the sudoers entry.
Choose the correct value for each blank.
operator ALL=() /usr/bin/systemctl restart nginxCorrect Answer:operator ALL=(root) NOPASSWD: /usr/bin/systemctl restart nginx
ExplanationThe runas specification root tells sudo to execute the command as root, and NOPASSWD: placed before the command path removes the password prompt for that one command. Using ALL as the runas user would also be broad but is not needed here, and writing it to specify nobody would not let systemctl restart a system service. SETENV only controls environment preservation and PASSWD: would still prompt for a password, which breaks the scripting requirement. Editing the file with visudo, as is standard practice, validates the syntax before it is saved.
-
10 Question 10 Single choice Topic 110: Security (weight: 10%)
A developer account on a shared host runs a memory-hungry test harness that has caused the machine to swap heavily and slow other users. The administrator wants to cap each developer's login session at 2 GB of address space and 200 processes without affecting system accounts or root. The limits must persist across logins for members of the developers group. Which configuration best meets these requirements?
Correct Answer: BExplanationpam_limits reads /etc/security/limits.conf at login, and a group entry prefixed with @ applies the limits only to members of that group, leaving root and system accounts unaffected. Specifying hard as and hard nproc makes the caps enforced for the session. Setting ulimit in ~/.bashrc works only for interactive Bash sessions and is easy for users to undo, so it does not meet the enforcement requirement. Renice changes scheduling priority rather than capping memory or process counts. MemoryMax and TasksMax are systemd unit settings, not sysctl keys, so placing them in sysctl.conf has no effect on user sessions.
-
11 Question 11 Order list Topic 110: Security (weight: 10%)
A sysadmin finds that a former employee's account can still log in over SSH, and the account must be disabled while preserving its files for an investigation. The account currently has a valid password hash and an active login shell. Arrange the steps in the correct order to disable access safely.
Drag the steps into the correct order, or use the arrows.
- Verify the lock with passwd -S and getent passwd for the account
- Archive the home directory with tar for the investigation
- Lock the account password with passwd -l so the hash no longer authenticates
- Change the login shell to /usr/sbin/nologin with usermod -s
- Terminate any running sessions using pkill -KILL -u with the username
Correct Answer:- Lock the account password with passwd -l so the hash no longer authenticates
- Change the login shell to /usr/sbin/nologin with usermod -s
- Terminate any running sessions using pkill -KILL -u with the username
- Verify the lock with passwd -S and getent passwd for the account
- Archive the home directory with tar for the investigation
ExplanationLocking the password first stops new password-based logins immediately, and changing the shell to nologin blocks any remaining interactive access even if key-based authentication is later reinstated. Killing the user's running processes then ends existing sessions that were started before the lock. Verifying with passwd -S and getent confirms the lock state and shell. Archiving the home directory comes last so that the evidence is captured after access is closed. Killing sessions before locking would let the user reconnect immediately, and archiving first risks changing files during the copy while the user is still active.
-
12 Question 12 Single choice Topic 109: Networking Fundamentals (weight: 14%)
A site is migrating its IPv6-only service endpoint to a dual-stack design. Engineers must decide which protocol the monitoring system should use to detect a host that is up but refuses connections, and which transport the DNS resolver will fall back to when a response exceeds the usual 512 byte limit. Which pairing is correct?
Correct Answer: AExplanationICMP echo is the basic reachability test at the network layer and can confirm a host responds even when no service accepts connections, which is the distinction the monitor needs. DNS falls back from UDP to TCP when a response will not fit the classic 512 byte UDP limit, and TCP handles the larger reply. UDP cannot be used for the fallback since it is the transport that failed for size. TCP reachability tests would report a refused connection as down rather than as reachable-but-refusing. UDP is connectionless and gives no reliable indication for a reachability probe.
These are 12 of the 234 questions in the full 102-500 pack.
Get All 234 QuestionsGet all 234 questions & answers
Full access options for LPI 102-500
Self-study
PDF Version
- 234 actual exam questions
- Compatible with all devices
- Printable PDF format
- No download limits
- 90 days free updates
- 24/7 customer support
Best value
Bundle Pack
- Discounted PDF + online access
- 234 actual exam questions
- Both PDF and online practice test
- Free 90 days updates
- No download or practice limits
- 24/7 customer support
Exam simulation
Online Practice Test
- 234 actual exam questions
- Actual exam environment
- 90 days free updates
- Browser-based software
- 24/7 customer support
100% Money Back Guarantee
Your success comes first
At DumpsProvider, we give you a 100% money back guarantee on all of our exam dumps. For us, your success is the #1 priority and we are more than confident that our exam material will help you pass the 102-500 Exam (LPIC-1 System Administrator Exam 102, Part 2 of 2, (version 5.0)) on your very first attempt.
In a rare case, if you fail your exam, we will refund your amount without asking a single question.