Context
The system's clock has drifted due to the absence of time synchronization.
Task
Manually and one-off synchronize the system's clock with timeservers in pool.ntp.org.
There is no need to update the hardware clock; the system is configured to do that at shutdown.
Do not configure automatic time synchronization.
See the complete solution in Explanation.
Objective: Correct the Linux system clock by performing a one-time synchronization against NTP servers from pool.ntp.org, without enabling continuous or automatic time synchronization and without modifying the hardware clock.
The video shows the candidate successfully executing:
sudo ntpdate pool.ntp.org
This is a valid solution. The terminal output confirms that the system clock was adjusted using an NTP server.
The official Ubuntu ntpdate(8) documentation confirms that ntpdate can synchronize the system clock manually without establishing an ongoing synchronization service.
Ubuntu Manpages
Step 1: Connect to the correct Linux server.
The video specifies host lfcs00103.
From the candidate terminal, execute:
ssh lfcs00103
This establishes an SSH session with the server whose system clock requires correction.
All subsequent commands must be executed on this host.
Step 2: Inspect the current system date and time.
Execute:
date
This displays the system's current local date and time.
For UTC:
date -u
The -u option displays the system time in Coordinated Universal Time.
Record the initial date and time so you can compare the system clock before and after synchronization.
The task states that the system clock has drifted. Therefore, its displayed time may differ significantly from the actual time reported by NTP servers.
Step 3: Check the current time synchronization status.
Execute:
timedatectl status
This displays information such as:
Local time.
Universal time.
RTC (hardware clock) time.
Configured timezone.
Whether an NTP synchronization service is active.
Whether the system reports its clock as synchronized.
An illustrative output is:
Local time: Sat 2026-10-03 11:30:00 UTC
Universal time: Sat 2026-10-03 11:30:00 UTC
RTC time: Sat 2026-10-03 11:30:00
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: no
NTP service: inactive
These values are illustrative rather than the actual output from the video.
Since the question asks for manual one-time synchronization, there is no need to configure an automatic NTP service.
Step 4: Verify that the ntpdate utility is available.
Execute:
command -v ntpdate
If installed, this command displays its executable path.
For example:
/usr/sbin/ntpdate
You can inspect the utility's manual:
man ntpdate
The task's demonstrated environment already has ntpdate available.
Therefore, installing additional software is unnecessary.
Step 5: Verify hostname resolution for the NTP server pool.
The task specifies:
pool.ntp.org
Check that the hostname resolves:
getent ahosts pool.ntp.org
This should return IP addresses associated with the NTP pool.
pool.ntp.org is a DNS-based collection of public NTP servers rather than one fixed machine.
Using the pool allows the time client to obtain available servers without manually specifying individual server addresses.
A successful synchronization also requires network connectivity to an NTP server, normally using UDP port 123.
Step 6: Check for an existing time synchronization daemon if necessary.
Execute:
systemctl is-active systemd-timesyncd
systemctl is-active chrony
systemctl is-active ntp
Some services may not be installed, so an inactive, unknown, or unit-not-found result is possible.
The task says not to configure automatic synchronization. It does not require enabling any of these services.
If an existing synchronization daemon interferes with a one-time adjustment, investigate and handle that conflict without unnecessarily modifying its persistent configuration.
Do not enable a daemon merely to synchronize the clock once.
Step 7: Synchronize the system clock manually using ntpdate.
Execute the primary solution:
sudo ntpdate pool.ntp.org
This is the command demonstrated in the video.
Command component
Purpose
sudo
Grants privileges to modify the system clock
ntpdate
Queries NTP servers and adjusts the local system clock
pool.ntp.org
Specifies the requested NTP server pool
The utility contacts NTP servers, estimates the difference between the local clock and server time, and corrects the local clock.
Depending on the implementation and magnitude of the error, it may step or slew the clock.
A step changes the displayed system time immediately. A slew changes the clock gradually.
The ntpdate manual documents the clock-setting behavior and the difference between querying and updating the clock.
Ubuntu Manpages
Step 8: Examine the synchronization output.
The recording shows that the ntpdate command corrected a substantial clock error.
The terminal includes a successful adjustment message of the form:
CLOCK: time stepped by 37212257.308748
It also reports that the system clock moved from an incorrect date in July 2025 to October 3, 2026.
This is significant because it confirms that the command did more than merely query an NTP server: it actually changed the system clock.
Your terminal output will depend on the clock's actual drift when the command runs.
A small drift may result in a different adjustment message.
Step 9: Verify the command's exit status.
Immediately after the synchronization command completes, execute:
echo $?
Expected:
0
The official ntpdate documentation specifies that a zero exit status indicates a successful clock update.
Ubuntu Manpages
A nonzero status indicates that the operation failed.
If the operation fails, investigate the actual error rather than assuming that the clock has been corrected.
Possible issues include unavailable DNS resolution, unreachable NTP servers, firewall restrictions, or interference from another time synchronization process.
Step 10: Verify the corrected system time.
Execute:
date
Then:
date -u
These commands display the system time after the NTP adjustment.
Compare the new values with the values recorded before synchronization.
The corrected clock should be consistent with the time reported by the selected NTP servers.
Step 11: Optionally check the remaining time offset without changing the clock.
Execute:
sudo ntpdate -q pool.ntp.org
The -q option means query only.
It obtains time information and reports the estimated offset without setting the clock.
This is useful after synchronization because it allows you to check whether the remaining clock difference is small.
Do not confuse:
sudo ntpdate -q pool.ntp.org
with:
sudo ntpdate pool.ntp.org
The first command queries only; the second performs the requested clock adjustment.
A small reported offset provides supporting evidence that the local clock is close to the NTP reference time.
Step 12: Do not configure automatic synchronization.
The task explicitly states:
Do not configure automatic time synchronization.
Therefore, do not enable a continuous time synchronization service as part of the solution.
For example, avoid:
sudo timedatectl set-ntp true
Also avoid enabling a daemon solely for this task:
sudo systemctl enable --now chrony
Likewise, do not create a cron job that runs ntpdate periodically.
These operations would establish ongoing synchronization behavior rather than performing the required one-time adjustment.
The command:
sudo ntpdate pool.ntp.org
already satisfies the one-time synchronization requirement when it completes successfully.
Step 13: Do not manually update the hardware clock.
Linux maintains two conceptually distinct clocks:
Clock
Description
System clock
Kernel-maintained clock used by running applications
Hardware clock (RTC)
Battery-backed or virtualized real-time clock used across system restarts
The task specifically instructs that the hardware clock does not need to be updated.
Therefore, do not execute:
sudo hwclock --systohc
This command copies the system clock to the hardware clock and is unnecessary for the task.
The exam environment is already configured to perform the appropriate hardware-clock update during shutdown.
Step 14: Do not modify persistent NTP configuration files.
The task does not require editing files such as:
/etc/chrony/chrony.conf
/etc/systemd/timesyncd.conf
/etc/ntp.conf
These files belong to time synchronization service configurations and are unrelated to the required manual one-time operation.
There is also no requirement to change the timezone.
Step 15: Verify the system status after synchronization.
Execute:
timedatectl status
Inspect the system time.
One important technical detail: after a manual ntpdate adjustment, timedatectl may still report:
System clock synchronized: no
This does not necessarily mean the one-time NTP adjustment failed.
That status may depend on whether a running time synchronization service or the kernel's synchronization status has marked the clock as synchronized.
For this task, rely primarily on the successful ntpdate execution, the resulting clock adjustment, and an optional read-only NTP offset check.
Do not enable automatic synchronization simply to change the timedatectl status.
Step 16: Alternative solution if ntpdate is unavailable.
If the host provides Chrony instead of ntpdate, the officially documented one-time synchronization command is:
sudo chronyd -q 'pool pool.ntp.org iburst'
chronyd is Chrony's time synchronization program.
-q instructs it to set the system clock once and exit.
pool pool.ntp.org selects servers from the specified NTP pool.
iburst performs an initial burst of requests for quicker synchronization.
This is the alternative recommended by Ubuntu's current time synchronization documentation.
Frequently Asked Questions
+1
Use this alternative only if appropriate for the installed environment. If another Chrony daemon is already running, avoid launching a competing clock controller without resolving that conflict.
For the environment demonstrated in the supplied video, ntpdate is available and is the simpler, directly demonstrated solution.
Step 17: Perform final verification.
Execute:
date -u
Confirm the corrected system time.
If needed, check the NTP offset without changing the clock:
sudo ntpdate -q pool.ntp.org
The completed task should satisfy:
Requirement
Expected result
Correct host
lfcs00103
NTP server pool
pool.ntp.org
System clock synchronized once
Yes
Method
Manual NTP adjustment
Automatic synchronization configured
No
Hardware clock manually changed
No
Clock adjustment
Successful
Final Solution
The essential commands are:
# Connect to the designated server
ssh lfcs00103
# Check the current system time
date -u
# Perform one-time synchronization
sudo ntpdate pool.ntp.org
# Verify the corrected time
date -u
# Optional: query the remaining offset without modifying the clock
sudo ntpdate -q pool.ntp.org
The single command that performs the requested adjustment is:
sudo ntpdate pool.ntp.org
Technical Verification and References
Ubuntu ntpdate(8) Manual
— Documents one-time clock synchronization, query-only mode and exit status.
Chrony Official FAQ
— Documents chronyd -q for one-time clock synchronization.
Ubuntu Server — Time Synchronization
— Explains NTP, Chrony and one-shot synchronization.
Video verification finding: At approximately 30:30–30:46, the candidate connects to lfcs00103 and executes sudo ntpdate pool.ntp.org. The terminal displays a successful clock-step operation, correcting a large time difference. No continuous synchronization service or hardware-clock modification is shown.
Expected result: The system clock on lfcs00103 is corrected through a single NTP synchronization against pool.ntp.org. No automatic time synchronization is configured, and the hardware clock is left unchanged.
next batch now
Task
First, inspect all application data partitions and find partitions utilizing more than 85% disk space.
Then, save the absolute path of these partitions' device files, one per line, to ~/partitions.txt.
Next, in data partitions using more than 85% disk space, delete the *.log files greater than 5 MB.
Do not modify any other data partitions.
See the complete solution in Explanation.
Step 1: Connect to the correct Linux server.
The video specifies that this task must be completed on host lfcs00077.
From the candidate terminal, execute:
ssh lfcs00077
All disk inspection, file creation, and deletion operations must be performed on this host.
Step 2: Inspect all mounted filesystems and disk utilization.
Execute:
df -hT
This displays information about mounted filesystems, including their utilization.
An illustrative output is:
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda1 ext4 40G 16G 24G 40% /
/dev/sdb1 ext4 20G 18G 2G 90% /data/app1
/dev/sdc1 ext4 30G 27G 3G 90% /data/app2
/dev/sdd1 ext4 50G 30G 20G 60% /data/app3
This output is an example, not data obtained from the actual exam host.
Explanation of the columns:
Column
Description
Filesystem
Device or filesystem source
Type
Filesystem type, such as ext4 or XFS
Size
Total filesystem capacity
Used
Used disk space
Avail
Available disk space
Use%
Percentage of disk space utilized
Mounted on
Directory where the filesystem is mounted
The task requires identifying application data partitions utilizing more than 85%.
For example:
/dev/sdb1 — 90% utilized — qualifies.
/dev/sdc1 — 90% utilized — qualifies.
/dev/sdd1 — 60% utilized — does not qualify.
The system partition /dev/sda1 should not be included merely because it appears in df output. The task specifically refers to application data partitions.
Step 3: Identify the available block devices.
Execute:
lsblk
For more detailed output:
lsblk -p -o NAME,SIZE,FSTYPE,MOUNTPOINTS
lsblk lists available block devices.
-p displays full device paths.
-o specifies the output columns.
NAME identifies the device.
SIZE displays its capacity.
FSTYPE shows the filesystem type.
MOUNTPOINTS lists its mountpoints.
An illustrative output is:
NAME SIZE FSTYPE MOUNTPOINTS
/dev/sda 40G
└─/dev/sda1 40G ext4 /
/dev/sdb 20G
└─/dev/sdb1 20G ext4 /data/app1
/dev/sdc 30G
└─/dev/sdc1 30G ext4 /data/app2
/dev/sdd 50G
└─/dev/sdd1 50G ext4 /data/app3
The output establishes the relationship between block devices, filesystems, and application data mountpoints.
This is necessary because the task requires saving device file paths, not mountpoint paths.
Step 4: Display filesystems using a consistent output format.
Execute:
df -P
The -P option uses the POSIX output format, which displays each filesystem on a single line.
This is useful when processing filesystem information with awk.
To identify all mounted filesystems whose reported utilization exceeds 85%, execute:
df -P | awk 'NR > 1 {
usage = $5
gsub(/%/, "", usage)
if (usage > 85)
print $1, usage "%", $6
}'
NR > 1 skips the header.
$5 extracts the utilization percentage.
gsub(/%/, "", usage) removes the percentage symbol.
usage > 85 selects filesystems whose reported utilization exceeds 85%.
$1 displays the filesystem source.
$6 displays the mountpoint.
An illustrative result is:
/dev/sdb1 90% /data/app1
/dev/sdc1 90% /data/app2
Important: This command identifies all filesystems over the threshold, not necessarily only application data filesystems. You must inspect the results and exclude unrelated system partitions.
Official GNU documentation confirms the purpose and output format of df -P.
Step 5: Verify the mountpoint associated with each qualifying device.
Execute:
findmnt -rno SOURCE,TARGET,FSTYPE
This shows the source devices, their mountpoints, and filesystem types.
For an individual qualifying mountpoint, use:
findmnt --mountpoint /data/app1
And:
findmnt --mountpoint /data/app2
These paths are illustrative. Replace them with the actual qualifying application data mountpoints.
Ensure that each selected filesystem:
Is an application data partition.
Has reported utilization greater than 85%.
Has an identified block-device path.
Is mounted at a known location.
Only proceed once these conditions are confirmed.
Step 6: Create the required ~/partitions.txt file.
The task requires saving the absolute paths of qualifying device files, one per line.
For example, suppose the qualifying devices are:
/dev/sdb1
/dev/sdc1
Execute:
printf '%s\n' /dev/sdb1 /dev/sdc1 > ~/partitions.txt
Replace /dev/sdb1 and /dev/sdc1 with the actual device paths identified on the exam server.
printf '%s\n' prints each supplied argument on a separate line.
/dev/sdb1 and /dev/sdc1 represent the qualifying device files.
> redirects output into the required file.
~/partitions.txt is the output file specified in the task.
The file must contain device paths rather than utilization percentages or mountpoint paths.
Step 7: Verify the contents of partitions.txt.
Execute:
cat ~/partitions.txt
For the illustrative devices, the expected content is:
/dev/sdb1
/dev/sdc1
Each qualifying device must appear on a separate line.
You can also number the lines to inspect the format:
cat -n ~/partitions.txt
Example:
1 /dev/sdb1
2 /dev/sdc1
Verify that no device from an application data filesystem at 85% or below appears in this file.
Step 8: Confirm that each saved path is a block device.
Execute:
while IFS= read -r device; do
ls -l "$device"
done < ~/partitions.txt
The device entries should represent valid block devices.
To check one device directly:
test -b /dev/sdb1
echo $?
An exit status of 0 indicates that the path refers to a block device.
Use the actual path from partitions.txt.
Step 9: Identify log files larger than 5 MB on qualifying partitions.
The next requirement is to delete *.log files greater than 5 MB, but only from qualifying data partitions.
For example, if /dev/sdb1 is mounted at /data/app1, execute:
sudo find /data/app1 -xdev -type f \
-name '*.log' -size +5000000c -print
Parameter
Purpose
/data/app1
Searches the selected qualifying filesystem
-xdev
Prevents descending into other mounted filesystems
-type f
Selects regular files
-name '*.log'
Selects filenames ending with .log
-size +5000000c
Selects files larger than 5,000,000 bytes
Displays matching files without deleting them
The task says 5 MB. The command above uses the strict decimal definition of 5 MB.
In GNU find, the alternative:
-size +5M
uses 5 MiB (5,242,880 bytes) rather than decimal megabytes. Both conventions occur in Linux administration, but they are not numerically identical. GNU Findutils documents these units explicitly.
Step 10: Preview the matching files on every qualifying partition.
For example, if /data/app1 and /data/app2 are the two qualifying mountpoints, execute:
sudo find /data/app1 -xdev -type f \
-name '*.log' -size +5000000c -print
Then:
sudo find /data/app2 -xdev -type f \
-name '*.log' -size +5000000c -print
Example results might be:
/data/app1/logs/application.log
/data/app1/logs/error.log
/data/app2/reports/debug.log
These filenames are illustrative.
Review the output before deleting anything.
This matters because the task expressly prohibits modifying other data partitions.
Step 11: Delete qualifying log files from the first selected partition.
After confirming the filesystem and matching files, execute:
sudo find /data/app1 -xdev -type f \
-name '*.log' -size +5000000c -delete
The -delete action removes the matching files permanently.
Do not execute the command against the entire root filesystem or an unqualified data partition.
The -xdev option is particularly important. It prevents traversal into other mounted filesystems located beneath the selected mountpoint.
Step 12: Delete qualifying log files from any additional qualifying partition.
For the second illustrative mountpoint:
sudo find /data/app2 -xdev -type f \
-name '*.log' -size +5000000c -delete
Repeat only for the remaining application data partitions whose utilization was greater than 85% during the initial inspection.
Do not apply deletion commands to other partitions.
GNU Findutils documents that -delete performs deletion directly and that its predicates should be tested using -print first.
Step 13: Verify that the matching log files have been removed.
Execute:
sudo find /data/app1 -xdev -type f \
-name '*.log' -size +5000000c -print
Then:
sudo find /data/app2 -xdev -type f \
-name '*.log' -size +5000000c -print
If there are no matching files remaining, the commands should produce no output.
If files remain, investigate permission errors or files that changed during the operation.
Step 14: Verify disk utilization after deletion.
Execute:
df -hT
Compare the disk utilization with the initial results.
For example:
Partition
Before
After
/dev/sdb1
90%
77%
/dev/sdc1
90%
82%
/dev/sdd1
60%
60%
These percentages are illustrative, not measured results.
There is no requirement to reduce the qualifying partitions below 85%; the task asks only to delete matching log files.
If a deleted file remains open in a running process, its storage space might not be released until the process closes the file. That does not justify stopping unrelated services without evidence.
Step 15: Confirm that other data partitions were not modified.
Review the original list of partitions and verify that deletion was limited to the selected qualifying mountpoints.
For example, do not execute:
sudo find /data/app3 -name '*.log' -delete
if /data/app3 had utilization of only 60%.
The task explicitly states:
Do not modify any other data partitions.
Therefore, applying a blanket cleanup command across /data, /, or all mounted filesystems would be incorrect.
Step 16: Verify the saved device list again.
Execute:
cat ~/partitions.txt
Confirm that it still contains the original qualifying device paths.
Do not regenerate this list after deletion.
For example, suppose /dev/sdb1 was initially 90% utilized but dropped to 77% after cleanup. It must still appear in ~/partitions.txt because it qualified during the initial inspection.
Step 17: Perform final verification.
Execute:
cat ~/partitions.txt
df -hT
lsblk -p -o NAME,FSTYPE,MOUNTPOINTS
Then run the file search on each qualifying mountpoint once more.
The completed task must meet these conditions:
Requirement
Expected result
Application data partitions inspected
Yes
Partitions greater than 85% identified
Yes
Device paths saved in ~/partitions.txt
Yes
One absolute device path per line
Yes
Matching log files greater than 5 MB deleted
Yes
Only qualifying partitions affected
Yes
Unrelated data partitions unchanged
Yes
Final Solution
The essential command sequence below illustrates the procedure. The two device paths and mountpoints are examples and must be replaced with the actual qualifying values on lfcs00077.
Copy commands
# Connect to the correct host
ssh lfcs00077
# Inspect disk utilization and mounted devices
df -hT
lsblk -p -o NAME,SIZE,FSTYPE,MOUNTPOINTS
# Find filesystems over 85%
df -P | awk 'NR > 1 {
usage=$5
gsub(/%/, "", usage)
if (usage > 85)
print $1, usage "%", $6
}'
# Confirm actual device-to-mountpoint relationships
findmnt -rno SOURCE,TARGET,FSTYPE
# EXAMPLE DEVICES: replace after identifying qualifying partitions
printf '%s\n' /dev/sdb1 /dev/sdc1 > ~/partitions.txt
# Verify the saved list
cat ~/partitions.txt
# EXAMPLE MOUNTPOINTS: preview before deleting
sudo find /data/app1 -xdev -type f \
-name '*.log' -size +5000000c -print
sudo find /data/app2 -xdev -type f \
-name '*.log' -size +5000000c -print
# Delete only on confirmed qualifying partitions
sudo find /data/app1 -xdev -type f \
-name '*.log' -size +5000000c -delete
sudo find /data/app2 -xdev -type f \
-name '*.log' -size +5000000c -delete
# Final verification
df -hT
cat ~/partitions.txt
Technical Verification and References
The procedures are consistent with the following official documentation:
GNU Coreutils — df command
Linux lsblk(8) — Block Device Inspection
GNU Findutils — File Size Matching
GNU Findutils — Filesystem Boundary Control
GNU Findutils — Deleting Files
Video verification finding: I located Question 6 at approximately 28:04–28:10 of the recording and confirmed the task wording and required host. The video moves to Question 7 without showing a completed terminal solution for Question 6. Therefore, the commands above are an independently documented solution, not a reproduction of commands successfully executed in the recording.
Expected result: The file ~/partitions.txt contains the absolute device paths of the application data partitions that initially exceeded 85% disk utilization. All qualifying .log files larger than the specified threshold are deleted from those partitions only, without modifying any other data partitions.
Task
Configure the system to enable the IP forwarding kernel feature persistently.
See the complete solution in Explanation.
Objective: Enable IPv4 packet forwarding on the Linux server and ensure that the setting remains enabled after a system reboot.
In Linux, IPv4 forwarding is controlled by the kernel parameter:
net.ipv4.ip_forward
This parameter determines whether the Linux kernel can forward IPv4 packets between network interfaces.
Value
Meaning
0
IPv4 forwarding disabled
1
IPv4 forwarding enabled
The task requires a persistent configuration, not merely a temporary runtime change.
The official Linux kernel documentation confirms that setting net.ipv4.ip_forward to 1 enables forwarding of IPv4 packets.
Step 1: Connect to the correct Linux server.
The video specifies that this task must be completed on host lfcs00081.
From the candidate terminal, execute:
ssh lfcs00081
This establishes an SSH session with the designated server.
All remaining commands must be executed on this host.
Step 2: Inspect the current IP forwarding configuration.
Execute:
sysctl net.ipv4.ip_forward
This displays the current value of the IPv4 forwarding parameter.
If forwarding is disabled, the output is:
net.ipv4.ip_forward = 0
If forwarding is already enabled, the output is:
net.ipv4.ip_forward = 1
You can also inspect the corresponding kernel interface directly:
cat /proc/sys/net/ipv4/ip_forward
Expected output when forwarding is disabled:
0
The /proc/sys/ hierarchy provides an interface for viewing and modifying runtime kernel parameters.
Step 3: Check the existing persistent configuration.
Before modifying anything, check whether the parameter is already configured elsewhere.
Execute:
sudo grep -RnsE '^[[:space:]]*net\.ipv4\.ip_forward[[:space:]] *=' \
/etc/sysctl.conf /etc/sysctl.d/ \
/run/sysctl.d/ /usr/lib/sysctl.d/ 2 > /dev/null
This searches the relevant sysctl configuration files.
For example, the output might include:
/etc/sysctl.conf:28:net.ipv4.ip_forward=0
This indicates that the existing configuration explicitly disables IPv4 forwarding.
If the parameter appears in multiple files, inspect the effective configuration order before changing it.
Step 4: Enable IPv4 forwarding immediately.
Execute:
sudo sysctl -w net.ipv4.ip_forward=1
sudo executes the command with administrative privileges.
sysctl reads or modifies kernel parameters.
-w writes a new value to a kernel parameter.
net.ipv4.ip_forward=1 enables IPv4 forwarding.
Expected output:
net.ipv4.ip_forward = 1
This change takes effect immediately.
However, this command alone does not guarantee persistence after reboot.
Therefore, additional configuration is required.
Step 5: Create a persistent sysctl configuration file.
The preferred method on a systemd-based Linux system is to create a dedicated file in:
/etc/sysctl.d/
Execute:
sudo nano /etc/sysctl.d/99-lfcs-ip-forward.conf
Add this exact line:
net.ipv4.ip_forward = 1
Save the file.
The complete file should contain:
net.ipv4.ip_forward = 1
Why this works:
/etc/sysctl.d/ stores persistent administrator-defined kernel settings.
.conf files in this directory are read during system startup.
The filename prefix 99- normally positions the file after most package-provided configuration files.
The setting enables IPv4 forwarding whenever it is applied.
The systemd sysctl.d(5) documentation confirms that these configuration files are used to apply kernel parameters during boot.
Step 6: Check for settings that could override the new value.
A particularly important consideration is /etc/sysctl.conf.
On Ubuntu systems using the procps implementation, sysctl --system processes /etc/sysctl.conf after the configuration files in sysctl.d.
Therefore, an existing entry such as:
net.ipv4.ip_forward = 0
inside /etc/sysctl.conf could override the value in the new file when sysctl --system is executed.
Inspect it:
sudo grep -n 'net.ipv4.ip_forward' /etc/sysctl.conf
If an active, conflicting entry is present, edit it:
sudo nano /etc/sysctl.conf
Change:
net.ipv4.ip_forward = 0
to:
net.ipv4.ip_forward = 1
Alternatively, remove the duplicate active entry and rely on the dedicated /etc/sysctl.d/99-lfcs-ip-forward.conf file.
Do not modify unrelated sysctl parameters.
The official sysctl(8) manual documents how --system processes configuration files and how /etc/sysctl.conf can override earlier values.
Step 7: Apply the persistent configuration immediately.
Execute:
sudo sysctl --system
This loads the sysctl settings from the system configuration.
The relevant output should include:
net.ipv4.ip_forward = 1
Review the command output for conflicting settings or errors.
Check the command's exit status immediately:
echo $?
A successful execution should normally return:
0
Step 8: Verify that IPv4 forwarding is enabled in the running kernel.
Execute:
sysctl net.ipv4.ip_forward
Expected:
net.ipv4.ip_forward = 1
Verify through the kernel interface:
cat /proc/sys/net/ipv4/ip_forward
Expected:
1
These two commands confirm the same runtime kernel setting through different interfaces.
Step 9: Verify the persistent configuration file.
Execute:
cat /etc/sysctl.d/99-lfcs-ip-forward.conf
Expected output:
net.ipv4.ip_forward = 1
You can also confirm that the setting remains active after reapplying its configuration:
sudo sysctl --system
sysctl net.ipv4.ip_forward
The final result should remain:
net.ipv4.ip_forward = 1
This confirms both that the runtime setting is enabled and that the system configuration can reapply it successfully.
Step 10: Verify persistence after a reboot, if permitted.
The strongest practical verification is to reboot the server and check the parameter afterward.
Only perform this step if rebooting the exam host is permitted and you can reconnect safely.
Execute:
sudo reboot
After the server finishes restarting, reconnect:
ssh lfcs00081
Then execute:
sysctl net.ipv4.ip_forward
Expected:
net.ipv4.ip_forward = 1
If the value remains 1, IPv4 forwarding has been restored successfully during startup.
Important: A reboot is not necessary to apply the change. sudo sysctl --system is sufficient for immediate activation. Avoid an unnecessary reboot during an exam if the required state can already be verified.
Step 11: Understand why both runtime and persistent changes matter.
There are two separate requirements to consider:
Configuration method
Immediate effect
Persistent after reboot
sudo sysctl -w net.ipv4.ip_forward=1
Yes
No, by itself
Write 1 to /proc/sys/net/ipv4/ip_forward
Yes
No, by itself
Configure /etc/sysctl.d/*.conf
After loading
Yes
Configure /etc/sysctl.conf on the Ubuntu setup
After loading
Yes
sudo sysctl --system
Applies configured values
Does not itself create persistence
The correct solution must leave the runtime parameter enabled and store the configuration in a location that is processed at startup.
Step 12: Confirm that IPv4 forwarding does not require additional configuration for this task.
The question asks only to enable the IP forwarding kernel feature persistently.
It does not request:
Configuring network interfaces.
Creating routing tables.
Adding NAT or firewall rules.
Enabling IPv6 forwarding.
Installing a routing daemon.
Therefore, these additional changes are unnecessary.
Enabling the kernel's forwarding feature allows Linux to forward IPv4 packets, but successful routing between networks can still depend on interface configuration, routing tables, and firewall policies.
Those are separate operational concerns and are not part of the stated task.
Step 13: Perform the final verification.
Execute:
sysctl net.ipv4.ip_forward
Expected:
net.ipv4.ip_forward = 1
Then:
cat /proc/sys/net/ipv4/ip_forward
Expected:
1
Finally:
cat /etc/sysctl.d/99-lfcs-ip-forward.conf
Expected:
net.ipv4.ip_forward = 1
The resulting configuration must satisfy the following:
Requirement
Expected result
IPv4 forwarding enabled
Yes
Runtime kernel parameter
1
Persistent configuration
Present
Settings reapply successfully
Yes
Other kernel parameters
Unchanged unless affected by the kernel's forwarding transition
IPv4 forwarding after reboot
Enabled
Final Solution
Copy commands
# Connect to the correct server
ssh lfcs00081
# Check current IPv4 forwarding status
sysctl net.ipv4.ip_forward
# Enable IPv4 forwarding immediately
sudo sysctl -w net.ipv4.ip_forward=1
# Make the setting persistent
printf 'net.ipv4.ip_forward = 1\n' | \
sudo tee /etc/sysctl.d/99-lfcs-ip-forward.conf
# Check for a conflicting setting in /etc/sysctl.conf
sudo grep -n 'net.ipv4.ip_forward' /etc/sysctl.conf
# Resolve any active conflicting entry if present,
# then apply persistent settings
sudo sysctl --system
# Verify the effective kernel setting
sysctl net.ipv4.ip_forward
# Verify directly through procfs
cat /proc/sys/net/ipv4/ip_forward
# Verify the persistent configuration
cat /etc/sysctl.d/99-lfcs-ip-forward.conf
Alternative Solution — Method Demonstrated in the Video
The candidate in the recording edits:
sudo vim /etc/sysctl.conf
This is also a valid approach on the Ubuntu environment shown.
Inside the file, locate the IPv4 forwarding setting:
#net.ipv4.ip_forward=1
If the line is commented out, uncomment it so it reads:
net.ipv4.ip_forward=1
If an active entry is already set to 0, change it to 1 instead. Ensure there are no contradictory active entries.
Save and apply:
sudo sysctl -p /etc/sysctl.conf
Verify:
sysctl net.ipv4.ip_forward
Expected:
net.ipv4.ip_forward = 1
Both approaches are valid. A dedicated file under /etc/sysctl.d/ is preferable for keeping administrator-specific changes separate, whereas editing /etc/sysctl.conf closely follows the method attempted in the recording. Use one consistent configuration and ensure no conflicting setting overrides it.
Technical Verification and References
The solution has been checked against official Linux and systemd documentation:
Linux Kernel — IP Sysctl Documentation — Defines the IPv4 forwarding parameter and its behavior.
Linux sysctl(8) — Documents runtime modification and applying system configuration.
systemd sysctl.d(5) — Explains persistent kernel settings loaded during startup.
Video verification finding: At approximately 28:20–29:10, the recording shows Task 8 on host lfcs00081. The candidate edits /etc/sysctl.conf and executes a reboot. However, the visible recording does not establish the precise final contents of the file or show a successful post-reboot check of net.ipv4.ip_forward.
Expected result: The Linux system has IPv4 forwarding enabled with net.ipv4.ip_forward = 1, and the setting is configured to remain enabled after reboot.
Task
First, inspect the system and identify the block device under heavy write load and which user process is causing the load.
Next, kill the process causing the load and unmount the device to prevent causing issues to the storage system in case this process runs again.
See the complete solution in Explanation.
Objective: Identify which Linux block device is experiencing excessive write activity, determine the user process generating that activity, terminate the offending process, and unmount the affected filesystem.
The solution requires four main operations:
Examine block-device read/write statistics.
Identify the process responsible for the heavy disk writes.
Terminate the identified process.
Unmount the filesystem associated with the affected block device.
The video provides useful evidence about the responsible process.
Findings from the video
Required host
lfcs00099
Process generating heavy writes
batches
Observed process ID
891
Process owner
root
Observed write rate Approximately 1,200 KiB/s in one sample
Mountpoint acted on in video
/media/batches
The recording shows batches as the principal writer and the candidate subsequently unmounting /media/batches. However, the original block-device name is not established clearly enough to quote as an exact device path. The solution below includes the commands needed to confirm that mapping.
Step 1: Connect to the correct Linux server.
The video specifies host lfcs00099.
Execute:
ssh lfcs00099
All diagnostic commands, process termination and unmounting must be performed on this host.
Step 2: Examine all available block devices.
Execute:
lsblk
For a more informative output:
lsblk -p -o NAME,TYPE,SIZE,FSTYPE,MOUNTPOINTS
Column
Purpose
NAME
Absolute block-device path
TYPE
Disk, partition, or logical device
SIZE
Device capacity
FSTYPE
Filesystem type
MOUNTPOINTS
Where the device's filesystem is mounted
An illustrative output might be:
NAME TYPE SIZE FSTYPE MOUNTPOINTS
/dev/sda disk 40G
└─/dev/sda1 part 40G ext4 /
/dev/sdb disk 10G
└─/dev/sdb1 part 10G ext4 /media/batches
/dev/sdc disk 20G
└─/dev/sdc1 part 20G ext4 /media/data
This output is an example, not confirmed device assignments from the video.
Do not assume that /dev/sdb1 is the affected device until the actual machine's storage configuration is inspected.
Step 3: Identify the block device experiencing excessive writes.
Use iostat, which is part of the sysstat utilities.
Execute:
iostat -dx 1 5
-d displays block-device activity.
-x enables extended I/O statistics.
1 specifies a one-second sampling interval.
5 requests five reports.
The command displays measurements for each block device.
Pay particular attention to:
Metric
Meaning
w/s
Write requests completed per second
wkB/s
Kilobytes written per second
w_await
Average time spent completing write requests
%util
Percentage of elapsed time during which the device had I/O requests
A device with unusually high sustained write throughput compared with the other devices is a candidate for the problematic storage workload.
An illustrative comparison:
Device r/s w/s rkB/s wkB/s %util
sda 2.00 1.00 8.00 4.00 1.00
sdb 0.00 250.00 0.00 1200.00 95.00
sdc 1.00 4.00 4.00 16.00 3.00
In this example, sdb deserves investigation.
High %util by itself does not establish a device fault, especially on modern parallel-I/O storage. Evaluate write throughput, latency and workload together. The official sysstat documentation defines these metrics.
GitHub
Step 4: Identify which user process is causing the write load.
The recording uses iotop to monitor process-level disk activity.
Execute:
sudo iotop
For a view restricted to processes currently performing I/O:
sudo iotop -oP
-o shows processes actively performing I/O.
-P presents process-level information rather than individual threads.
iotop displays process IDs, owners, disk-read rates, disk-write rates and command names.
The important columns are:
TID PRIO USER DISK READ DISK WRITE COMMAND
The task concerns heavy writes, so focus on DISK WRITE, not DISK READ.
The official iotop manual confirms that these measurements represent process-level I/O activity.
Linux manual page
Step 5: Identify the offending process from the video.
At approximately 32:45–33:25 in the recording, the terminal shows iotop output with processes including:
PID USER DISK READ DISK WRITE COMMAND
891 root 0 B/s ~1200 KiB/s batches
927 root ~1200 KiB/s 0 B/s ingest
909 root ~20 KiB/s ~20 KiB/s data
944 root ~20 KiB/s ~20 KiB/s export
These are rounded observations from the displayed sampling interval, not fixed process characteristics.
The important distinction is that ingest is responsible mainly for read activity in the observed samples, whereas batches is the dominant writer.
Therefore, the process to investigate and terminate is batches, observed as PID 891.
PIDs are assigned dynamically and must be checked on the live system before termination.
Step 6: Verify the identity of the process.
On the exam host, execute:
ps -p 891 -o pid,ppid,user,comm,args
For the recorded session, the command should identify batches if PID 891 is still assigned to the same process.
The ps output displays:
PID: process identifier.
PPID: parent process identifier.
USER: account that owns the process.
COMMAND/ARGS: executable name and command-line arguments.
If the PID is different in a fresh session, substitute the PID obtained from iotop.
Do not terminate PID 891 blindly on another system.
Step 7: Verify the process's actual write activity.
Linux exposes per-process I/O statistics through:
/proc/PID/io
For the observed PID:
sudo cat /proc/891/io
The output includes fields such as:
rchar:
wchar:
syscr:
syscw:
read_bytes:
write_bytes:
cancelled_write_bytes:
The write_bytes field reports bytes attributed to the process as writes to the storage layer.
You can inspect the relevant fields:
sudo grep -E 'read_bytes|write_bytes' /proc/891/io
Take two measurements several seconds apart to determine whether write activity is increasing.
The Linux kernel's /proc/PID/io documentation describes these counters and their limitations.
Linux manual page
Step 8: Identify the filesystem being written to by batches.
Execute:
sudo lsof -p 891
lsof lists open files associated with the selected process.
Look for open files located under the affected mountpoint.
For example, paths might begin with:
/media/batches/
If the process has an open writable file on /media/batches, that supports the connection between the observed write activity and this filesystem.
Be aware that lsof lists open resources; not every open file is necessarily responsible for the observed write rate.
Cross-check with block-device I/O measurements.
Step 9: Identify the actual block device mounted at /media/batches.
Execute:
findmnt --mountpoint /media/batches
For concise output:
findmnt -no SOURCE,FSTYPE,TARGET --mountpoint /media/batches
This displays the filesystem source and mountpoint.
For example:
/dev/sdb1 ext4 /media/batches
If this is the output, the block-device path is /dev/sdb1.
This is illustrative. The actual block device must come from the exam host.
Also verify the mapping through:
lsblk -p -o NAME,TYPE,FSTYPE,MOUNTPOINTS
The official findmnt(8) manual documents using --mountpoint to inspect the filesystem mounted at a particular directory.
Linux manual page
Step 10: Confirm that the identified device is responsible for the heavy write activity.
Compare the block device reported by findmnt with the output of:
iostat -dx 1 5
You should now have both pieces of information required by the first part of the task:
The block device experiencing the heavy writes.
The responsible process.
For the recorded scenario, the process evidence points to batches, and the candidate's selected target is /media/batches.
If the block-device statistics instead identify another device, investigate the discrepancy before terminating anything.
Step 11: Check whether the offending process is still running.
Execute:
ps -p 891
Or, using the PID obtained from the current investigation:
ps -p PID -o pid,user,comm,args
Replace PID with the actual current process ID.
Confirm the command name and owner one final time immediately before sending a termination signal.
Step 12: Terminate the process gracefully.
The recommended first attempt is:
sudo kill -TERM 891
This sends SIGTERM to the observed process.
SIGTERM requests an orderly shutdown and allows applications to perform cleanup operations.
Check whether the process has stopped:
ps -p 891
The official Linux kill(1) manual recommends attempting SIGTERM before SIGKILL when possible.
Linux manual page
Step 13: Forcefully terminate the process only if required.
The candidate in the video uses:
sudo kill -9 891
This sends SIGKILL, which terminates the process without allowing it to handle the signal.
The equivalent named-signal command is:
sudo kill -KILL 891
This is technically valid if the process cannot be stopped normally.
However, it is preferable to attempt SIGTERM first, because abruptly killing a writer may interrupt in-progress writes or application cleanup.
For the recorded process, PID 891 is the primary target. The video additionally shows the candidate killing PIDs 909 and 944, but those processes display much lower write activity. Their termination is not justified solely by the task evidence.
Step 14: Verify the offending process has stopped.
Execute:
ps -p 891 -o pid,comm
If the process has fully exited, it should no longer appear as an active process.
You can also inspect:
sudo iotop -oP
The batches process should no longer be generating disk writes.
If the process has restarted automatically with a new PID, investigate its parent process or service rather than relying on the original PID.
Step 15: Inspect remaining users of the affected filesystem.
Before unmounting, execute:
sudo fuser -vm /media/batches
This identifies processes accessing files on the filesystem.
The options mean:
-v: display verbose information.
-m: identify processes accessing the specified mounted filesystem.
The fuser documentation describes this behavior.
Linux manual page
Review the output.
If unrelated processes still need the filesystem, determine whether they can safely stop accessing it. Do not kill every listed process indiscriminately.
Step 16: Unmount the affected filesystem.
Once the offending process has stopped and the filesystem is no longer busy, execute:
sudo umount /media/batches
This is the unmount operation shown in the recording.
sudo provides administrative privileges.
umount detaches a mounted filesystem from the Linux directory hierarchy.
/media/batches identifies the target mountpoint.
The official umount(8) manual confirms that specifying the mountpoint is the normal way to unmount a filesystem.
Linux manual page
Step 17: Handle a busy filesystem if necessary.
If the command reports:
umount: /media/batches: target is busy
it means the filesystem is still being used.
Recheck:
sudo fuser -vm /media/batches
Also inspect:
sudo lsof +f -- /media/batches
A process may have open files, memory mappings, or its working directory on that filesystem.
Close those references appropriately and retry:
sudo umount /media/batches
Do not immediately force or lazily unmount the filesystem.
A lazy unmount can hide an ongoing problem by detaching the mountpoint while references to the filesystem remain. The official umount documentation warns about this distinction.
Linux manual page
Step 18: Verify the filesystem is unmounted.
Execute:
findmnt --mountpoint /media/batches
A successful unmount should result in no matching mount being displayed.
For an additional check:
mountpoint -q /media/batches
echo $?
A nonzero exit status indicates that the directory is not currently a mountpoint.
Also inspect:
lsblk -p -o NAME,TYPE,FSTYPE,MOUNTPOINTS
The affected filesystem should no longer list /media/batches as an active mountpoint.
Step 19: Verify that the excessive write activity has stopped.
Execute:
iostat -dx 1 5
Compare the affected device's write statistics against the measurements recorded before termination.
Also execute:
sudo iotop -oP
Confirm that the original heavy-writing process is no longer active.
Other normal system processes may continue performing I/O. The requirement is to eliminate the problematic workload and unmount its affected device, not to reduce all system writes to zero.
Step 20: Avoid unnecessary modifications to other devices.
The video shows the candidate issuing additional commands involving /media/data and other processes.
Those actions should not automatically be repeated.
The task asks for the block device under heavy write load and the process causing that load.
Unless measurements establish that several devices are affected, there is no reason to unmount unrelated filesystems.
In particular, do not use:
sudo umount -a
This attempts to unmount multiple filesystems and is inappropriate for a targeted storage operation.
Also do not reformat, repartition or remove the affected block device.
Unmounting does not delete the data stored on the filesystem.
Step 21: Consider whether automatic remounting is configured.
Unmounting /media/batches changes the current mounted state, but it does not necessarily prevent the filesystem from being mounted again after a reboot.
For example, the filesystem may be configured through /etc/fstab or a systemd mount unit.
Inspect relevant configuration if the requirement is specifically to keep the device unmounted across restarts:
findmnt --fstab
However, the task instructs you to unmount the device, not explicitly to remove persistent mount configuration.
Do not alter /etc/fstab or disable unrelated services without a demonstrated requirement.
Step 22: Perform final verification.
Execute:
ps -p 891 -o pid,comm
findmnt --mountpoint /media/batches
lsblk -p -o NAME,TYPE,FSTYPE,MOUNTPOINTS
iostat -dx 1 3
If PID 891 is the same offending process observed in the recording and /media/batches is confirmed as its affected filesystem, the expected result is:
Requirement
Expected result
Correct host
lfcs00099
Heavily written block device
Identified using iostat and lsblk
Responsible process
batches
Observed PID
891
Process owner
root
Process terminated
Yes
Affected mountpoint
/media/batches
Filesystem unmounted
Yes
Original excessive write activity
No longer present
Final Solution
The following is the focused command sequence for the scenario shown in the video.
# Connect to the designated server
ssh lfcs00099
# Inspect block devices and mounted filesystems
lsblk -p -o NAME,TYPE,SIZE,FSTYPE,MOUNTPOINTS
# Identify the device under heavy write load
iostat -dx 1 5
# Identify the process generating disk writes
sudo iotop -oP
# Confirm the process identity
# Video PID 891; verify the live PID before proceeding
ps -p 891 -o pid,ppid,user,comm,args
# Inspect files opened by the process
sudo lsof -p 891
# Confirm the affected block-device mapping
findmnt -no SOURCE,FSTYPE,TARGET \
--mountpoint /media/batches
# Request orderly termination
sudo kill -TERM 891
# Confirm the process stopped
ps -p 891
# Check remaining filesystem users
sudo fuser -vm /media/batches
# Unmount the affected filesystem
sudo umount /media/batches
# Verify the filesystem is no longer mounted
findmnt --mountpoint /media/batches
# Verify block-device mount status
lsblk -p -o NAME,TYPE,FSTYPE,MOUNTPOINTS
# Check write activity again
iostat -dx 1 3
If normal termination fails and the process is still confirmed to be the same offending workload, use:
sudo kill -KILL 891
Then recheck the process state and retry the unmount.
Technical Verification and References
The procedure has been checked against the following upstream Linux and sysstat documentation:
sysstat iostat Manual
— Measuring block-device I/O activity and write throughput.
Linux iotop(8)
— Identifying processes performing heavy disk I/O.
Linux findmnt(8)
— Identifying filesystem sources and mountpoints.
Linux kill(1)
— Terminating processes using signals.
Linux fuser(1)
— Identifying processes using mounted filesystems.
Linux umount(8)
— Safely detaching filesystems.
Video verification findings
At approximately 32:40–34:15, Question 16 appears on host lfcs00099. The recording shows iotop identifying batches (PID 891, owned by root) as the process producing the dominant write activity.
The candidate then runs:
sudo kill -9 891
sudo umount /media/batches
Both commands are technically valid for their respective operations. However, the recording does not provide a sufficiently clear device-to-mountpoint mapping to certify the actual block-device path. It also shows additional process terminations and unmounts that are not established as necessary by the write measurements.
Expected result: The high-write-load block device is identified, the batches process responsible for the excessive writes is terminated, and its associated filesystem at /media/batches is unmounted after confirming the device mapping. Unrelated processes and storage devices remain unaffected.
next last task now please
Worked for 2m 32s
Task
Persistently configure the OpenSSH daemon to allow keyboard-interactive authentication for user jack.
Do not modify the user's password.
Do not modify any other user's ability to log in.
See the complete solution in Explanation.
Step 1: Connect to the correct Linux server.
The video specifies that this task must be performed on host lfcs00073.
From the candidate terminal, execute:
ssh candidate@lfcs00073
This establishes an SSH connection to the designated Linux server.
All subsequent configuration changes must be performed on this host.
Step 2: Verify that user jack exists.
Execute:
id jack
This displays the user's UID, primary group and supplementary groups.
An example of valid output is:
uid=1001(jack) gid=1001(jack) groups=1001(jack)
The numerical IDs may differ.
You can also verify the account through the system user database:
getent passwd jack
The task requires modifying SSH authentication, not creating or modifying the user account.
Do not execute passwd jack or change the user's existing password.
Step 3: Identify the OpenSSH daemon configuration file.
The primary OpenSSH server configuration file on Ubuntu is:
/etc/ssh/sshd_config
Additionally, OpenSSH may load configuration fragments from:
/etc/ssh/sshd_config.d/
Inspect the primary configuration file:
sudo cat /etc/ssh/sshd_config
Check whether additional configuration files exist:
sudo ls -la /etc/ssh/sshd_config.d/
The effective OpenSSH configuration may depend on directives in both locations.
Step 4: Identify the existing authentication settings.
Execute:
sudo grep -RniE \
'KbdInteractiveAuthentication|ChallengeResponseAuthentication|UsePAM|AuthenticationMethods|Match' \
/etc/ssh/sshd_config /etc/ssh/sshd_config.d/ 2 > /dev/null
This searches for authentication-related directives.
The most important directive is:
KbdInteractiveAuthentication
It controls whether the SSH daemon permits keyboard-interactive authentication.
Possible values:
Configuration
Meaning
KbdInteractiveAuthentication yes
Permits keyboard-interactive authentication
KbdInteractiveAuthentication no
Disables keyboard-interactive authentication
On Ubuntu 22.04, the packaged OpenSSH configuration commonly disables keyboard-interactive authentication globally while enabling PAM.
OpenSSH daemon configuration file
However, the task requires the method to be enabled specifically for jack, without changing other users' login ability.
Therefore, simply changing the global directive from no to yes is not the appropriate solution.
Step 5: Examine the effective configuration before changing anything.
Execute:
sudo sshd -T \
-C user=jack,host=localhost,addr=127.0.0.1
This displays the effective SSH daemon configuration for a connection matching user jack.
To filter the relevant settings:
sudo sshd -T \
-C user=jack,host=localhost,addr=127.0.0.1 \
| grep -E 'kbdinteractiveauthentication|usepam|authenticationmethods'
For example, an initial configuration might show:
kbdinteractiveauthentication no
usepam yes
authenticationmethods any
This is an illustrative output. The actual values must be checked on the server.
Also record the same settings for another existing user, such as candidate:
sudo sshd -T \
-C user=candidate,host=localhost,addr=127.0.0.1 \
| grep -E 'kbdinteractiveauthentication|usepam|authenticationmethods'
These baseline values will be useful when verifying that other users remain unaffected.
Step 6: Back up the existing OpenSSH configuration.
Before modifying the daemon configuration, execute:
sudo cp -a /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
cp copies the configuration file.
-a preserves ownership, permissions and other file metadata.
/etc/ssh/sshd_config.bak is the backup copy.
If a configuration error occurs, the original file can be restored.
Keep the existing SSH session open while making these changes.
Step 7: Edit the OpenSSH daemon configuration.
Open the configuration file:
sudo nano /etc/ssh/sshd_config
Alternatively, use Vim:
sudo vim /etc/ssh/sshd_config
Review any existing Match directives before adding the required configuration.
Step 8: Configure keyboard-interactive authentication specifically for jack.
Provided no earlier matching block takes precedence, append the following configuration at the end of /etc/ssh/sshd_config:
Match User jack
KbdInteractiveAuthentication yes
This is the central configuration required for the task.
Match User jack
The Match directive begins a conditional configuration section.
The User jack condition means that the directives inside this section apply to connections authenticating as jack.
KbdInteractiveAuthentication yes
This enables keyboard-interactive authentication for connections satisfying the preceding Match condition.
Other users do not match User jack, so they retain their existing global or user-specific settings.
OpenSSH's official documentation permits KbdInteractiveAuthentication inside a Match section.
OpenSSH daemon configuration file
Important: If the existing configuration already contains a matching Match User jack or Match All block setting this option, edit the appropriate existing rule instead. OpenSSH generally uses the first occurrence of a directive among satisfied Match blocks. Simply appending a later block may not override an earlier matching rule.
Step 9: Save the configuration file.
If using Nano:
Press Ctrl + O to save.
Press Enter to confirm.
Press Ctrl + X to exit.
If using Vim, press Esc, type :wq, and press Enter.
The modified file should contain the user-specific rule:
Match User jack
KbdInteractiveAuthentication yes
Do not add a global AllowUsers jack rule. That could prevent other users from logging in and would violate the task.
Step 10: Verify the PAM authentication setting.
Execute:
sudo sshd -T \
-C user=jack,host=localhost,addr=127.0.0.1 \
| grep usepam
For the normal Ubuntu PAM-based authentication setup, the expected configuration is:
usepam yes
UsePAM yes allows OpenSSH to use PAM for keyboard-interactive authentication.
On Ubuntu, this directive normally appears in the global configuration.
Do not place UsePAM inside the Match User jack block. It is not a valid Match-specific directive in the relevant OpenSSH configuration.
If PAM is globally disabled, investigate the existing authentication design before changing it. Enabling PAM globally could affect other users, contrary to the task's constraints.
Step 11: Validate the SSH configuration syntax.
Before reloading the daemon, execute:
sudo sshd -t
sshd is the OpenSSH server daemon.
-t validates the configuration and checks relevant server key requirements.
A successful validation normally produces no output and returns exit code 0.
Check the result:
echo $?
Expected:
0
If errors are displayed, correct them before proceeding.
Do not restart or reload SSH with an invalid configuration.
Step 12: Verify that keyboard-interactive authentication is enabled for jack.
Execute:
sudo sshd -T \
-C user=jack,host=localhost,addr=127.0.0.1 \
| grep kbdinteractiveauthentication
Expected output:
kbdinteractiveauthentication yes
This confirms the effective server configuration for the specified user and connection context.
Unlike simply inspecting the configuration file, sshd -T -C evaluates applicable Match rules.
OpenSSH daemon
Step 13: Confirm that other users' authentication settings have not changed.
Execute:
sudo sshd -T \
-C user=candidate,host=localhost,addr=127.0.0.1 \
| grep -E 'kbdinteractiveauthentication|usepam|authenticationmethods'
Compare the output with the baseline recorded in Step 5.
If the original configuration had keyboard-interactive authentication disabled for candidate, it should remain disabled.
For example:
kbdinteractiveauthentication no
usepam yes
authenticationmethods any
The important requirement is that other users retain their original effective authentication settings, not that every server necessarily produces these example values.
Also verify any existing AuthenticationMethods policy. If it requires a method sequence that excludes standalone keyboard-interactive authentication, simply enabling KbdInteractiveAuthentication may not permit a keyboard-interactive-only login. Any necessary adjustment must remain specific to jack.
Step 14: Reload the OpenSSH daemon.
After verifying the configuration, execute:
sudo systemctl reload ssh
On Ubuntu, the systemd service is normally named ssh.
Reloading causes the daemon to apply its updated configuration without unnecessarily terminating established SSH sessions.
Step 15: Verify the SSH service is operational.
Execute:
sudo systemctl status ssh --no-pager
Expected active status:
Active: active (running)
You can also execute:
systemctl is-active ssh
Expected:
active
Step 16: Test keyboard-interactive authentication for jack.
From a separate SSH session, execute:
ssh -o PreferredAuthentications=keyboard-interactive \
-o PubkeyAuthentication=no \
-o PasswordAuthentication=no \
jack@localhost
PreferredAuthentications=keyboard-interactive selects keyboard-interactive authentication.
PubkeyAuthentication=no prevents the client from authenticating using a public key.
PasswordAuthentication=no disables the separate SSH password authentication method, without disabling keyboard-interactive prompts.
jack@localhost attempts to connect as user jack.
If PAM supports the account and the user supplies the correct existing credentials, the server should permit keyboard-interactive authentication.
If the server uses a multi-factor AuthenticationMethods policy, adapt the test to that policy and confirm keyboard-interactive authentication is offered at the appropriate stage.
Do not modify jack's password to perform the test.
Step 17: Perform final configuration checks.
Execute:
sudo sshd -t
Verify the setting for jack:
sudo sshd -T \
-C user=jack,host=localhost,addr=127.0.0.1 \
| grep kbdinteractiveauthentication
Expected:
kbdinteractiveauthentication yes
Verify another user's setting:
sudo sshd -T \
-C user=candidate,host=localhost,addr=127.0.0.1 \
| grep kbdinteractiveauthentication
The value must remain consistent with that user's original configuration.
Finally:
systemctl is-active ssh
Expected:
active
Final Solution
1. Connect to the correct host.
ssh candidate@lfcs00073
2. Back up the SSH configuration.
sudo cp -a /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
3. Edit the configuration file.
sudo nano /etc/ssh/sshd_config
4. Add the required configuration at the appropriate location, after checking existing Match rules.
Match User jack
KbdInteractiveAuthentication yes
5. Validate the SSH configuration.
sudo sshd -t
6. Verify the effective setting for jack.
sudo sshd -T \
-C user=jack,host=localhost,addr=127.0.0.1 \
| grep kbdinteractiveauthentication
Expected:
kbdinteractiveauthentication yes
7. Reload the SSH daemon.
sudo systemctl reload ssh
8. Confirm that SSH remains active.
systemctl is-active ssh
Expected:
active
Technical Verification and References
The solution has been checked against the official OpenSSH documentation for Ubuntu.
Match User applies specified configuration directives to connections matching a particular username.
KbdInteractiveAuthentication controls whether keyboard-interactive authentication is permitted.
UsePAM enables PAM integration used for keyboard-interactive authentication on typical Ubuntu systems.
sshd -t validates server configuration syntax.
sshd -T -C evaluates effective configuration settings for a particular connection, including applicable Match sections.
Official references:
Ubuntu OpenSSH sshd_config(5)
Ubuntu OpenSSH sshd(8)
OpenSSH Configuration Reference
Expected result: Keyboard-interactive authentication is persistently permitted for user jack, without changing the user's password or altering other users' existing login settings. Successful end-to-end authentication must also be confirmed with a valid login test.
|
PDF + Testing Engine
|
|---|
|
$42.5 |
|
Testing Engine
|
|---|
|
$32.5 |
|
PDF (Q&A)
|
|---|
|
$26.25 |
Linux Foundation Free Exams |
|---|
|
Copyright © 2026 Examstrack. All Rights Reserved
TESTED 08 Nov 2026
