LPI 202-450 Practice Test Questions and Exam Dumps Part 2 Q21-40

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

 

Question 21. Which BIND record type identifies the mail servers responsible for accepting email for a domain?

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

Correct Answer: 3. MX

Explanation :-

An MX (Mail Exchange) record identifies the mail servers responsible for receiving email for a DNS domain. When a mail transfer agent needs to deliver a message, it queries DNS for the domain’s MX records and then attempts delivery to the specified mail hosts according to their preference values. A lower preference number has higher priority. PTR records are used for reverse DNS, CNAME creates aliases, and SOA defines authoritative zone information such as the primary name server and serial number. Proper MX configuration is therefore essential for reliable inbound email delivery.

Question 22. In a BIND zone file, which record identifies the primary authoritative name server and contains zone timing information?

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

Correct Answer: 1. SOA

Explanation :-

The SOA (Start of Authority) record contains essential administrative information about a DNS zone. It identifies the primary authoritative name server and includes values such as the responsible administrator’s email address, serial number, refresh interval, retry interval, expiration period, and minimum or negative caching information. DNS secondary servers use these timing values when determining when to check for zone changes. An NS record identifies authoritative name servers but does not contain the complete zone timing information. A records map names to IPv4 addresses, while MX records specify mail delivery servers.

Question 23. Which Apache directive specifies the directory from which files are served for a virtual host?

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

Correct Answer: 4. DocumentRoot

Explanation :-

The Apache DocumentRoot directive specifies the filesystem directory containing the documents that Apache serves for a website or virtual host. For example, a virtual host may use /srv/www/example as its DocumentRoot. When a client requests a resource, Apache resolves the URL path relative to that directory. ServerName identifies the hostname associated with the virtual host, Listen determines the address and port Apache accepts connections on, and DirectoryIndex specifies default files such as index.html. Correctly configuring DocumentRoot is fundamental when hosting multiple websites on the same Apache server.

Question 24. Which Apache directive is commonly used to redirect clients from one URL to another?

  1. RewriteBase
  2. Redirect
  3. DirectoryIndex
  4. ServerAlias

Correct Answer: 2. Redirect

Explanation :-

The Apache Redirect directive can be used to send an HTTP redirect response to clients requesting a particular URL. It is useful when content has moved to another location or when administrators want to direct users from an old path to a new one. Apache can issue different redirect status codes depending on the configuration and requirements. ServerAlias defines additional hostnames for a virtual host, DirectoryIndex controls default index files, and RewriteBase is associated with URL rewriting rules. The Redirect directive therefore provides a straightforward mechanism for changing the destination of requested resources.

Question 25. Which Samba utility is used to check the syntax and validity of the smb.conf configuration file?

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

Correct Answer: 1. testparm

Explanation :-

testparm is a Samba utility used to check the syntax of the Samba configuration file and report configuration problems. It is commonly run after modifying /etc/samba/smb.conf to verify that Samba can interpret the configuration correctly. It can also display the effective configuration after processing the file. smbclient is used to access SMB/CIFS resources, smbstatus reports current Samba connections and locks, and nmblookup performs NetBIOS name queries. Running testparm before restarting or reloading Samba helps administrators detect configuration mistakes early.

Question 26. Which command can be used to interactively access a Windows SMB/CIFS share from a Linux system?

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

Correct Answer: 3. smbclient

Explanation :-

smbclient is a command-line client for accessing SMB/CIFS resources, including shares hosted by Windows systems and Samba servers. It provides an interface similar to an FTP client and can be used to list shares, authenticate to a share, transfer files, and perform other operations. exportfs manages NFS exports on a server, showmount displays NFS export information, and nfsstat reports NFS statistics. Samba administrators commonly use smbclient to test connectivity and authentication to an SMB share without first mounting the share into the local filesystem.

Question 27. Which command displays the NFS filesystems currently exported by a remote server?

  1. exportfs -r
  2. showmount -e
  3. nfsstat -m
  4. rpcinfo -p

Correct Answer: 2. showmount -e

Explanation :-

The showmount -e command queries an NFS server and displays the filesystems it exports. This is useful when troubleshooting NFS access or determining which directories are available for mounting. The -e option specifically requests the export list from the remote server. exportfs -r is used on an NFS server to re-export filesystems based on its configuration. nfsstat reports NFS statistics, while rpcinfo -p lists registered RPC services and their ports. Although modern NFS environments may use NFSv4 and different discovery mechanisms, showmount -e remains an important LPIC-2 objective utility.

Question 28. Which NFS configuration file defines filesystems that a server exports to clients?

  1. /etc/nfs.conf
  2. /etc/fstab
  3. /etc/exports.deny
  4. /etc/exports

Correct Answer: 4. /etc/exports

Explanation :-

The /etc/exports file defines filesystems that an NFS server makes available to clients and specifies which hosts or networks may access them. Export entries can include access controls and options such as read-only access, synchronization behavior, and root squashing. After changing the file, administrators can use exportfs to apply the updated export configuration. /etc/fstab is primarily used for filesystem mounts, including NFS client mounts, rather than defining server exports. Properly configuring /etc/exports is therefore central to controlling NFS server access.

Question 29. Which option in an NFS export prevents a remote root user from being treated as root on the exported filesystem?

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

Correct Answer: 1. root_squash

Explanation :-

The root_squash NFS export option maps requests from the remote root user to an anonymous or unprivileged identity on the server. This prevents a client-side root account from automatically receiving root-level privileges on the exported filesystem. It is an important security feature because otherwise a compromised or improperly controlled client could potentially use root privileges to modify protected files on the NFS server. ro makes an export read-only, sync controls write synchronization behavior, and no_subtree_check changes subtree checking behavior. Root squashing is therefore specifically concerned with limiting remote root privileges.

Question 30. Which DHCP message does a client send first when it is attempting to obtain an IPv4 address through the normal DHCP discovery process?

  1. DHCPDISCOVER
  2. DHCPACK
  3. DHCPREQUEST
  4. DHCPOFFER

Correct Answer: 1. DHCPDISCOVER

Explanation :-

A DHCP client normally begins the address allocation process by broadcasting a DHCPDISCOVER message. Because the client may not yet have an IP address or know the DHCP server’s address, the initial message is typically sent as a broadcast. A DHCP server can respond with a DHCPOFFER containing an available address and configuration information. The client then uses DHCPREQUEST to request an offered configuration, and the server completes the process with DHCPACK. Understanding this sequence is important when troubleshooting DHCP client configuration and address-assignment problems.

Question 31. Which command is commonly used on Linux to display the current IP addresses assigned to network interfaces?

  1. route
  2. arp
  3. hostname
  4. ip addr

Correct Answer: 4. ip addr

Explanation :-

The ip addr command displays IP address information associated with network interfaces. It can show IPv4 and IPv6 addresses, interface state information, prefixes, and related details. It is part of the modern iproute2 suite and is commonly preferred over older tools such as ifconfig. The route command focuses on routing information, arp is associated with ARP table information, and hostname primarily displays or changes the system hostname. When troubleshooting network client configuration, ip addr is a fundamental command for verifying whether an interface has the expected address.

Question 32. Which file traditionally contains static hostname-to-IP address mappings on a Linux system?

  1. /etc/resolv.conf
  2. /etc/hostname
  3. /etc/hosts
  4. /etc/services

Correct Answer: 3. /etc/hosts

Explanation :-

The /etc/hosts file contains local static mappings between hostnames and IP addresses. It can be used for name resolution without contacting a DNS server and is useful for small environments, testing, or overriding DNS results for selected hosts. /etc/resolv.conf contains DNS resolver configuration such as nameserver addresses, while /etc/hostname commonly contains the local system hostname. /etc/services maps service names to port numbers and protocols. Depending on the system’s Name Service Switch configuration, /etc/hosts may be consulted before or after DNS when resolving hostnames.

Question 33. Which Postfix configuration parameter specifies the domains for which the local system should consider itself the final destination?

  1. relayhost
  2. mydestination
  3. myhostname
  4. inet_interfaces

Correct Answer: 2. mydestination

Explanation :-

In Postfix, the mydestination parameter specifies the domains and hostnames for which the server is considered the final destination. Mail addressed to those destinations is normally delivered locally rather than relayed to another SMTP server. myhostname defines the system’s mail hostname, while relayhost specifies a server through which outbound mail may be relayed. inet_interfaces controls the network interfaces on which Postfix listens. Correctly configuring mydestination is particularly important on mail servers that host local mailboxes because it determines which domains Postfix accepts for local delivery.

Question 34. Which file is commonly used to define aliases for local email addresses on a Linux system using Postfix?

  1. /etc/mailcap
  2. /etc/aliases.db
  3. /etc/postfix/virtual
  4. /etc/aliases

Correct Answer: 4. /etc/aliases

Explanation :-

The /etc/aliases file defines local mail aliases that redirect messages from one local address to another destination. For example, an alias can direct mail sent to postmaster to an administrator’s account. After changing /etc/aliases, the alias database generally needs to be regenerated with an appropriate command such as newaliases, depending on the mail system configuration. /etc/postfix/virtual is used for virtual aliasing in configurations that employ Postfix virtual alias maps. /etc/aliases is therefore a traditional and important mechanism for managing local administrative mail addresses.

Question 35. Which protocol is primarily used by IMAP clients to retrieve and manage email while keeping messages stored on the server?

  1. IMAP
  2. SMTP
  3. FTP
  4. DNS

Correct Answer: 1. IMAP

Explanation :-

IMAP, the Internet Message Access Protocol, is designed for accessing and managing email stored on a mail server. Unlike traditional POP-based workflows, IMAP supports server-side folders, message state, and synchronization across multiple clients. This makes it suitable for users who access the same mailbox from several devices. SMTP is primarily used for sending and relaying email, while FTP transfers files and DNS provides name resolution. Mail systems such as Dovecot commonly provide IMAP services. Secure IMAP deployments can use TLS to protect authentication and message traffic.

Question 36. Which Dovecot command-line utility is commonly used to perform mailbox administration tasks?

  1. doveconf
  2. dovecot
  3. doveadm
  4. mailq

Correct Answer: 3. doveadm

Explanation :-

doveadm is the Dovecot administration utility used for various mailbox and server management operations. Administrators can use it for tasks such as searching mailboxes, manipulating messages, checking mailbox status, and performing administrative maintenance. doveconf is primarily used to display and inspect Dovecot configuration. The dovecot command is associated with managing the Dovecot service itself, while mailq is commonly associated with viewing mail queues in mail transfer agent environments such as Postfix. Understanding Dovecot’s administrative utilities is part of managing IMAP and POP3 mailbox services.

Question 37. Which Linux kernel parameter must generally be enabled for a host to forward IPv4 packets between network interfaces?

  1. net.ipv4.tcp_syncookies
  2. net.ipv4.conf.all.rp_filter
  3. net.ipv4.icmp_echo_ignore_all
  4. net.ipv4.ip_forward

Correct Answer: 4. net.ipv4.ip_forward

Explanation :-

The net.ipv4.ip_forward kernel parameter controls whether a Linux system forwards IPv4 packets between interfaces. Setting it to 1 enables IPv4 forwarding, which is commonly required when configuring a Linux system as a router or gateway. Administrators can inspect the current value through /proc/sys/net/ipv4/ip_forward or the corresponding sysctl parameter. Other parameters have different purposes, such as reverse-path filtering or TCP protection. Packet forwarding alone does not provide NAT or firewall policy; those functions require additional configuration, such as appropriate netfilter rules.

Question 38. Which iptables target is commonly used to perform source network address translation for outgoing connections?

  1. DNAT
  2. SNAT
  3. REDIRECT
  4. REJECT

Correct Answer: 2. SNAT

Explanation :-

The SNAT target in iptables performs source network address translation by changing the source address of packets. It is commonly used when systems on a private network access external networks through a Linux gateway. For example, private IPv4 addresses can be translated to a public address before packets leave the gateway. DNAT changes destination addresses and is commonly used for port forwarding, while REDIRECT redirects traffic locally and REJECT blocks traffic with a response. SNAT is therefore directly associated with changing the source address during outbound NAT.

Question 39. Which SSH configuration directive disables direct remote login by the root account?

  1. PermitRootLogin no
  2. PasswordAuthentication no
  3. AllowUsers root
  4. UsePAM no

Correct Answer: 1. PermitRootLogin no

Explanation :-

The PermitRootLogin directive in the OpenSSH server configuration controls whether the root account can log in directly through SSH. Setting PermitRootLogin no disables direct root login, encouraging administrators to authenticate with an ordinary account and then use controlled privilege escalation such as sudo. PasswordAuthentication no disables password-based authentication but does not specifically control root login. AllowUsers defines which users are permitted to connect, while UsePAM controls integration with PAM. Disabling direct root SSH access is a common hardening measure for remotely administered Linux systems.

Question 40. Which Linux security mechanism provides a framework for configuring authentication, account management, session handling, and password policies for applications?

  1. SELinux
  2. PAM
  3. AppArmor
  4. iptables

Correct Answer: 2. PAM

Explanation :-

PAM, the Pluggable Authentication Modules framework, provides a standardized mechanism for applications to use configurable authentication and account-management services. PAM can control authentication, password changes, account restrictions, and session-related behavior without requiring each application to implement these functions independently. Configuration is commonly organized under /etc/pam.d/. SELinux and AppArmor provide mandatory or policy-based access controls, while iptables provides network packet filtering and firewall functionality. PAM is therefore the mechanism most directly associated with centralized authentication and account policy configuration across Linux services and applications.