Courseiva
Back to Linux Professional Institute Certification Level 2 LPIC-2 questions

Scenario-based practice

Hard Difficulty Questions

Practise Linux Professional Institute Certification Level 2 LPIC-2 practice questions — original exam-style scenarios covering every exam domain, with detailed explanations, wrong-answer analysis, and common exam traps.

20
scenario questions
LPIC-2
exam code
LPI
vendor

Scenario guide

How to approach hard difficulty questions

These are the questions most candidates get wrong. They require connecting multiple concepts, reading tricky output, or knowing edge-case behaviour that isn't on most study cards. Practising them trains you to operate under uncertainty — a necessary skill on the real exam.

Quick answer

Hard Difficulty Questions questions test whether you can apply the concept in context, not just recognise a definition.

How the topic appears in realistic exam-style scenarios.

Which detail in the question changes the correct answer.

How to eliminate plausible but wrong options.

How to connect the question back to the wider exam objective.

Related practice questions

Related LPIC-2 topic practice pages

Scenario questions usually connect to one or more exam topics. Use these links to review the underlying concepts behind the scenario.

Practice set

Practice scenarios

Question 1hardmultiple choice
Full question →

A system's root filesystem on /dev/sda1 is offline. The administrator boots into rescue mode and needs to check the filesystem integrity. Which command should be used first?

Question 2hardmultiple choice
Full question →

Which sysctl parameter controls the system's behavior when a kernel oops occurs (e.g., automatically reboot)?

Question 3hardmultiple choice
Full question →

Refer to the exhibit. Which kernel version will be booted by default when using a standard GRUB2 configuration that uses the symlinks vmlinuz and initrd.img?

Network Topology
-rw-rr
Question 4hardmultiple choice
Full question →

An administrator configures iptables on a Linux firewall with the following rules: -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT; -A INPUT -p tcp --dport 22 -m state --state ESTABLISHED,RELATED -j ACCEPT; -A INPUT -j DROP. Users report that SSH connections are being dropped. What is the most likely cause?

Question 5hardmultiple choice
Full question →

Based on the smbstatus output, which statement is true?

Exhibit

Refer to the exhibit.

$ smbstatus
Samba version 4.15.2
PID     Username     Group        Machine                        Protocol Version
12345   alice        staff        win10-pc (192.168.1.10)        SMB3_11
12346   bob          users        win7-pc (192.168.1.11)         SMB2_10

Service      pid     Machine       Connected at
share1       12345   win10-pc      Tue Mar 14 10:00:00 2023
share2       12346   win7-pc       Tue Mar 14 10:05:00 2023

Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock       SharePath   Name
12345        1001       DENY_NONE  0x100089    RDONLY     NONE         /srv/samba/share1   report.pdf
12346        1002       DENY_NONE  0x100089    RDONLY     NONE         /srv/samba/share2   data.xls
Question 6hardmultiple choice
Full question →

Refer to the exhibit. The /data filesystem is nearly full. The administrator has added a new disk /dev/sdc with 10GB capacity. The VG currently has no free space. Which steps will increase the available space for /data using LVM and ext4?

Exhibit

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/mapper/vg-data  20G   16G  4.0G  80% /data
Question 7hardmultiple choice
Full question →

A Linux system administrator is tasked with upgrading the kernel on a server running a custom compiled kernel (version 4.19) with many in-house modules. The new kernel (5.10) has significant changes, including a different API for some module functions. After compiling the new kernel and the modules, the system boots but some modules fail to load with 'Unknown symbol' errors. The administrator needs to identify which symbols are missing and fix the modules. Which of the following is the most effective approach?

Question 8hardmultiple choice
Full question →

An administrator notices that an NFS mount on a client becomes unresponsive when the NFS server goes offline. The admin wants the mount to return an error to the application after a short timeout instead of hanging indefinitely. Which mount option should be added to the fstab entry?

Question 9hardmultiple choice
Full question →

A Samba server is configured with 'security = ads' and joined to an Active Directory domain. Users can authenticate but cannot access shares. The smb.conf includes 'winbind use default domain = yes'. What could be the problem?

Question 10hardmultiple choice
Full question →

A Samba server experiences slow file transfers for large files. The administrator suspects oplock issues. Which set of parameters should be adjusted to disable opportunistic locking?

Question 11hardmultiple choice
Full question →

Refer to the exhibit. What is the most likely cause of this Apache error?

Exhibit

[crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Question 12hardmultiple choice
Full question →

A database server experiences performance degradation. Analysis shows high I/O wait on a LVM logical volume that uses striping across two physical volumes. What is the most effective way to improve performance?

Question 13hardmulti select
Full question →

Which three PAM modules can be used to enforce password complexity? (Select three.)

Question 14hardmultiple choice
Full question →

An administrator configures an NIS client by running 'ypbind' and updating /etc/nsswitch.conf to include 'nis' for passwd, shadow, and group. However, 'getent passwd' still shows only local users. Which step is most likely missing?

Question 15hardmultiple choice
Review the full subnetting walkthrough →

A Linux router running multiple routing tables is misconfigured. The administrator wants to add a policy routing rule that sends all traffic from subnet 10.10.0.0/16 to routing table 200. Which command should be used?

Question 16hardmultiple choice
Full question →

A system administrator has compiled a custom Linux kernel (version 5.15.19) with ext4 filesystem support built as a module. The administrator installed the kernel to /boot and built an initramfs using dracut with default options. After rebooting, the system fails with a kernel panic: 'VFS: Unable to mount root fs on unknown-block(0,0)'. The administrator confirms that the root partition is /dev/sda1 formatted as ext4 and that the kernel configuration includes the ext4 module. The kernel command line includes 'root=/dev/sda1' and 'rd.auto'. The administrator also notices that the initramfs file is only 5 MB in size, which seems smaller than expected. Which of the following is the most likely cause and best solution?

Question 17hardmultiple choice
Full question →

A mail server running Postfix is deferring messages for a local user. The mail log shows 'status=deferred (mailbox is locked)'. What is the most likely cause?

Question 18hardmultiple choice
Full question →

A database server uses LVM with an XFS filesystem on /dev/vg_data/lv_db, mounted at /var/lib/mysql. The LV is at 95% capacity. A new 50GB disk /dev/sdd has been added and initialized as a physical volume, then added to the volume group vg_data. The database is running and cannot be stopped. The administrator must extend the LV and filesystem. What is the correct course of action?

Question 19hardmultiple choice
Full question →

A user reports that they cannot SSH to a remote server using the usual command 'ssh user@remote.example.com'. The administrator tests and gets 'Permission denied (publickey,gssapi-keyex,gssapi-with-mic)'. The user's public key is in ~/.ssh/authorized_keys on the remote server. The local client has the matching private key. Which step should the administrator take to resolve the issue?

Question 20hardmultiple choice
Review the full subnetting walkthrough →

Traffic from the 10.1.1.0/24 subnet is seen leaving through eth1 as intended, but reply traffic from the internet never comes back. What is the most likely cause?

Exhibit

Refer to the exhibit.

# ip rule show
0:      from all lookup local
32766:  from all lookup main
32767:  from all lookup default
# ip route show table 100
default via 10.0.0.1 dev eth0
# ip route show table 200
default via 172.16.0.1 dev eth1
# ip rule add from 10.1.1.0/24 lookup 200
# ip rule add from 10.2.2.0/24 lookup 100

These LPIC-2 practice questions are part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style LPIC-2 questions with detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics.