LPI 202-450 Practice Test Questions and Exam Dumps Part 18 Q341-360

View Full LPI 202-450  Exam Dumps and Practice Test Dumps

 

Question 341. Which BIND directive controls whether a server will send recursive queries on behalf of clients?

  1. allow-transfer
  2. recursion
  3. notify
  4. check-names

Correct Answer: 2. recursion

Explanation :-

The recursion directive in BIND controls whether recursive query processing is enabled. When set to yes, the server can perform recursive lookups for clients, which is commonly required for a caching or recursive DNS server. This is different from allow-recursion, which controls which clients are permitted to use recursive service. An authoritative-only DNS server commonly disables recursion to reduce unnecessary processing and avoid becoming an open resolver. Other directives have different purposes: allow-transfer controls zone transfers, notify controls DNS NOTIFY behavior, and check-names affects name syntax checking.

Question 342. In Apache HTTP Server, which directive is used to define a virtual host’s canonical hostname?

  1. DirectoryIndex
  2. DocumentRoot
  3. ErrorDocument
  4. ServerName

Correct Answer: 4. ServerName

Explanation :-

The Apache ServerName directive specifies the hostname and, optionally, the port that the server uses to identify itself within a virtual host or server configuration. It is especially important in name-based virtual hosting because Apache uses the requested hostname to select the appropriate <VirtualHost> configuration. DocumentRoot specifies where web files are stored, DirectoryIndex determines default index files, and ErrorDocument defines custom responses for HTTP errors. A properly configured ServerName also helps avoid ambiguous hostname identification and related startup warnings on many Apache installations.

Question 343. Which NFS export option prevents a client from using root privileges to access exported files as the server’s root user?

  1. root_squash
  2. no_subtree_check
  3. sync
  4. insecure

Correct Answer: 1. root_squash

Explanation :-

The NFS root_squash option maps requests from the client-side root user to an unprivileged identity on the NFS server. This reduces the security risk of allowing a remote root account to access files with server-side root privileges. It is commonly used for NFS exports because client machines should not automatically gain root-level authority over server files. no_subtree_check controls subtree checking, sync affects when changes are committed, and insecure permits connections from non-privileged client ports. The root-squashing behavior is therefore specifically associated with limiting remote root privileges.

Question 344. Which Samba utility displays information about the current connections to a Samba server?

  1. testparm
  2. smbclient
  3. smbstatus
  4. smbpasswd

Correct Answer: 3. smbstatus

Explanation :-

The smbstatus utility displays information about current Samba connections, including connected clients, locked files, and active sessions. It is useful when troubleshooting file-sharing activity or determining which users and systems currently have connections to a Samba server. testparm is primarily used to validate and inspect Samba configuration files. smbclient provides a command-line client for accessing SMB/CIFS shares, while smbpasswd manages Samba password information. Administrators can therefore use smbstatus when they need operational information about active Samba sessions rather than configuration validation.

Question 345. Which DNS record identifies the mail server responsible for receiving email for a domain?

  1. CNAME
  2. PTR
  3. TXT
  4. MX

Correct Answer: 4. MX

Explanation :-

An MX, or Mail Exchange, record specifies the mail servers responsible for accepting email for a DNS domain. An MX record normally contains a preference value and the hostname of the mail server. When multiple MX records exist, the preference values help determine the order in which mail servers should be attempted. A CNAME provides an alias for another DNS name, PTR records support reverse DNS lookups, and TXT records contain arbitrary text data commonly used for verification and email-related policies. Correct MX configuration is therefore essential for reliable inbound email delivery.

Question 346. Which DHCP option supplies clients with the IP address of a DNS resolver?

  1. Option 6
  2. Option 3
  3. Option 15
  4. Option 1

Correct Answer: 1. Option 6

Explanation :-

DHCP option 6 specifies DNS servers that DHCP clients should use for name resolution. A DHCP server can provide one or more resolver IP addresses through this option, allowing clients to automatically configure their DNS settings without manual intervention. Option 3 identifies the default gateway, option 15 specifies the DNS domain name, and option 1 defines the subnet mask. When troubleshooting automatically assigned DNS settings, administrators should therefore check whether the DHCP server is supplying the expected values through option 6.

Question 347. Which Postfix parameter specifies the domains for which the local machine should consider itself the final destination?

  1. relayhost
  2. mynetworks
  3. mydestination
  4. myorigin

Correct Answer: 3. mydestination

Explanation :-

The Postfix mydestination parameter identifies the domains and hostnames for which Postfix should deliver mail locally. Messages addressed to destinations listed there are treated as local mail rather than being forwarded to another mail server. This parameter is therefore important when configuring a server that receives email for its own domains. relayhost specifies an upstream relay, mynetworks identifies trusted networks, and myorigin determines the domain appended to locally generated mail. Misconfiguring mydestination can cause mail to be incorrectly rejected, relayed, or delivered.

Question 348. In Dovecot, which configuration database defines how user authentication credentials are obtained?

  1. service imap
  2. mail_location
  3. namespace
  4. passdb

Correct Answer: 4. passdb

Explanation :-

Dovecot uses the passdb configuration to define how authentication credentials are obtained and verified. Depending on the deployment, credentials can be checked against files, system accounts, SQL databases, LDAP, or other authentication backends. The related userdb configuration provides information about users after authentication, such as UID, GID, or mail location. mail_location specifies where mailboxes are stored, while namespace settings define mailbox namespaces. Understanding the distinction between passdb and userdb is important when troubleshooting authentication and mailbox-access problems in Dovecot-based mail services.

Question 349. Which OpenSSH command-line option specifies the identity file to use for public-key authentication?

  1. -i
  2. -p
  3. -L
  4. -X

Correct Answer: 1. -i

Explanation :-

The OpenSSH client uses the -i option to specify a private key file for authentication. For example, ssh -i ~/.ssh/server_key user@example.com tells the SSH client to use that identity file when attempting to authenticate. The -p option specifies a non-default server port, -L establishes local port forwarding, and -X enables X11 forwarding. Using an explicit identity file is especially useful when a user maintains multiple SSH keys for different servers, accounts, or environments. File permissions on private keys must also be appropriately restricted.

Question 350. Which command displays the current SELinux enforcement mode?

  1. semanage
  2. restorecon
  3. audit2allow
  4. getenforce

Correct Answer: 4. getenforce

Explanation :-

The getenforce command reports the current SELinux enforcement mode. Its output is typically Enforcing, Permissive, or Disabled. In enforcing mode, SELinux policy violations are actively blocked. In permissive mode, violations are logged but generally not prevented by SELinux. restorecon restores security contexts, semanage manages SELinux policy-related configuration, and audit2allow can generate policy rules from audit information. Administrators frequently use getenforce as an initial troubleshooting step when determining whether SELinux is actively enforcing security policy on a system.

Question 351. Which nftables command displays the complete active ruleset across configured tables and chains?

  1. nft list ruleset
  2. nft show firewall
  3. nft display all
  4. nft rules

Correct Answer: 1. nft list ruleset

Explanation :-

The nft list ruleset command displays the complete nftables ruleset currently loaded in the kernel. It can show tables, chains, sets, and rules across the firewall configuration, making it useful for auditing and troubleshooting. More targeted commands can display individual tables or chains, but list ruleset provides a broad view of the active configuration. The other options listed are not standard nftables commands for displaying the complete ruleset. Administrators commonly use this command to verify whether expected firewall rules are actually present and active.

Question 352. Which DNS record is used for reverse resolution from an IPv4 address to a hostname?

  1. A
  2. MX
  3. PTR
  4. NS

Correct Answer: 3. PTR

Explanation :-

A PTR record maps an IP address to a hostname and is used for reverse DNS resolution. IPv4 reverse DNS records are normally stored under the in-addr.arpa domain. For example, a lookup of an IPv4 address can retrieve its associated PTR record when reverse DNS is correctly configured. An A record maps a hostname to an IPv4 address, MX identifies mail servers, and NS identifies authoritative name servers for a DNS zone. Reverse DNS is commonly used for diagnostics, logging, and email-server reputation checks.

Question 353. Which Apache directive specifies the file or response returned when a requested resource produces an HTTP error?

  1. ServerAlias
  2. ErrorDocument
  3. DirectoryIndex
  4. Listen

Correct Answer: 2. ErrorDocument

Explanation :-

Apache’s ErrorDocument directive defines what should be returned when a particular HTTP error occurs. Administrators can configure a local file, a local URL, or another response for errors such as 404 Not Found or 403 Forbidden. For example, an administrator can use ErrorDocument 404 /404.html to provide a custom page when a requested resource does not exist. ServerAlias defines alternative hostnames, DirectoryIndex specifies default index files, and Listen controls network addresses and ports on which Apache accepts connections.

Question 354. Which command is commonly used to mount an NFS filesystem from a remote server?

  1. exportfs
  2. showmount
  3. mount
  4. nfsstat

Correct Answer: 3. mount

Explanation :-

The mount command is commonly used to attach an NFS export to a local directory. For example, an administrator can specify an NFS server and exported path as the remote filesystem and provide a local mount point. The exportfs command manages exports on an NFS server, showmount displays information about NFS exports and clients, and nfsstat reports NFS statistics. Mounting an NFS filesystem may involve specifying the filesystem type with -t nfs and additional options depending on the NFS version and required behavior.

Question 355. Which Postfix command displays the current mail queue?

  1. postmap
  2. postsuper
  3. postconf
  4. postqueue

Correct Answer: 4. postqueue

Explanation :-

The postqueue utility is used to inspect and manage the Postfix mail queue, with postqueue -p commonly used to display queued messages. This is useful when diagnosing delayed or undelivered mail. postmap creates and manages indexed lookup databases, postconf displays or modifies Postfix configuration parameters, and postsuper performs administrative operations on queued messages, such as deleting or moving them. Examining the mail queue is often an early troubleshooting step when messages remain pending instead of being delivered.

Question 356. Which file commonly contains the system’s resolver configuration on traditional Linux systems?

  1. /etc/resolv.conf
  2. /etc/hosts.allow
  3. /etc/nsswitch.conf
  4. /etc/services

Correct Answer: 1. /etc/resolv.conf

Explanation :-

The /etc/resolv.conf file traditionally contains DNS resolver configuration, including nameserver addresses and resolver-related search domains. Applications and resolver libraries can use this information when performing DNS lookups. On systems using NetworkManager or systemd-resolved, the file may be generated or managed dynamically rather than edited permanently by hand. /etc/hosts.allow is associated with TCP wrappers, /etc/nsswitch.conf controls the order of name-service sources, and /etc/services maps service names to port numbers. Understanding these distinctions helps diagnose DNS and hostname-resolution problems.

Question 357. Which SSH server configuration directive changes the TCP port on which sshd listens?

  1. ListenAddress
  2. AllowUsers
  3. Port
  4. HostKey

Correct Answer: 3. Port

Explanation :-

The OpenSSH server’s Port directive specifies the TCP port on which sshd accepts SSH connections. The default is normally TCP port 22, although administrators may configure another port when required by their environment. ListenAddress controls the local addresses on which the daemon listens, AllowUsers restricts which accounts may connect, and HostKey identifies server host-key files. After changing the SSH port, administrators must ensure that the firewall permits the new port and that clients connect using the corresponding port number.

Question 358. Which command recursively restores the default SELinux security contexts for files under a directory?

  1. restorecon -R
  2. chcon -r
  3. semanage restore
  4. setsebool -R

Correct Answer: 1. restorecon -R

Explanation :-

The restorecon -R command recursively restores SELinux security contexts according to the system’s configured file-context policy. It is particularly useful after files have been copied, moved, or otherwise assigned incorrect contexts. The -R option tells restorecon to process directories recursively. chcon can directly change contexts but is generally not the preferred mechanism for persistent policy-defined labeling. semanage is used to manage SELinux policy settings, while setsebool changes SELinux boolean values. Correct file contexts are essential for services operating under SELinux enforcement.

Question 359. Which dig option performs a trace beginning from the DNS root servers to determine the delegation path?

  1. +short
  2. +noall
  3. +trace
  4. +stats

Correct Answer: 3. +trace

Explanation :-

The dig +trace option performs an iterative DNS resolution starting from the root servers and follows referrals through the DNS hierarchy until reaching the authoritative server for the requested name. This makes it valuable when troubleshooting delegation problems, missing records, or unexpected DNS responses. +short reduces the output to a concise answer, +noall suppresses most standard output sections, and +stats controls statistics output. Because +trace follows the delegation path rather than relying entirely on a recursive resolver, it can reveal where a DNS resolution process is failing.

Question 360. Which command displays the available network interfaces and their link-layer state?

  1. ip route show
  2. ip addr flush
  3. ip neigh show
  4. ip link show

Correct Answer: 4. ip link show

Explanation :-

The ip link show command displays network interfaces and information about their link-layer state. Output commonly includes interface names, interface indexes, MAC addresses, and states such as UP, DOWN, or related operational information. ip route show displays the routing table, ip neigh show displays the neighbor cache, and ip addr focuses on IP addresses assigned to interfaces. Administrators frequently use ip link show when diagnosing whether an interface exists and whether its link state is configured as expected.