Pass Lpi 102-500 Exam With Practice Test Questions Dumps Bundle [Q131-Q156]

Share

Pass Lpi 102-500 Exam With Practice Test Questions Dumps Bundle

2025 Valid 102-500 test answers & Lpi Exam PDF


How much LPIC-1 Linux Administrator, 102-500 Exam Cost

The price of the LPIC-1 Linux Administrator, 102-500 exam fee is 200 USD.

 

NEW QUESTION # 131
Of the ways listed, which is the best way to temporarily suspend a single user's ability to interactively login?

  • A. Change the user name in /etc/passwd.
  • B. Change the user's password.
  • C. Add the user name to /etc/nologin.
  • D. Place the command logout in the user's profile.
  • E. Use change to expire the user account.

Answer: E

Explanation:
The best way to temporarily suspend a single user's ability to interactively login is to use the chage command to expire the user account. The chage command can modify the expiration date of a user account, which is stored in the /etc/shadow file. By setting the expiration date to a past date, the user account will be locked and the user will not be able to login. This method is temporary because the expiration date can be changed again to a future date or removed to unlock the user account. For example, to expire the user account linuxconfig, we can use the following command:
# chage -E 0 linuxconfig
This will set the expiration date to January 1, 1970, which is the epoch date. To check the expiration date of a user account, we can use the -l option:
# chage -l linuxconfig
Last password change : Aug 24, 2021
Password expires : never
Password inactive : never
Account expires : Jan 01, 1970
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
To remove the expiration date of a user account, we can use the -E option with an empty argument:
# chage -E "" linuxconfig
The other options are either invalid or not recommended. Adding the user name to /etc/nologin will not work, because /etc/nologin is a file that contains a message to be displayed to users who try to login when the system is down for maintenance. Changing the user's password is not a good idea, because it will affect the user's authentication and may cause security issues. Changing the user name in /etc/passwd will also affect the user's authentication and may cause inconsistencies with other files and services. Placing the command logout in the user's profile will not prevent the user from logging in, but only log them out immediately after login, which is not very elegant or secure. References: 1: How to disable user login with Linux nologin - LinuxConfig.org 2:
Disable a user's login without disabling the account - Unix & Linux Stack Exchange 3: How to Block or Disable Normal User Logins in Linux? - GeeksforGeeks 4: How to Disable User Logins on Linux | Baeldung on Linux 5: How to Disable a User in Linux - Linux Nightly 6: How to deactivate or disable a user account in Ubuntu 20.04 LTS - Vitux 7: chage(1) - Linux manual page


NEW QUESTION # 132
Given the following excerpt of the sudo configuration:
jane ANY=NOPASSWD: /bin/kill, /bin/id, PASSWD: /sbin/fdisk
Which of the following statements are true? (Choose three.)

  • A. Jane can run /sbin/fdisk after specifying root's password.
  • B. Jane can run /bin/id only after specifying her password.
  • C. Jane can run /bin/id without specifying her password.
  • D. Jane can run /bin/kill without specifying a password.
  • E. Jane can run /sbin/fdisk after specifying her password.

Answer: C,D,E

Explanation:
The sudo configuration file (/etc/sudoers) defines the rules for granting privileges to users or groups to execute commands as another user, usually the superuser or root. The format of the sudo configuration file is as follows:
user_list host_list=effective_user_list tag_list command_list
The user_list specifies the users who can run the commands, the host_list specifies the hosts where the commands can be run, the effective_user_list specifies the user as whom the commands can be run, the tag_list specifies some options for the commands, and the command_list specifies the commands that can be run.
In this case, the user_list is jane, the host_list is ANY (meaning any host), the effective_user_list is not specified (meaning root by default), the tag_list is NOPASSWD or PASSWD (meaning whether a password is required or not), and the command_list is /bin/kill, /bin/id, or /sbin/fdisk.
Therefore, the sudo configuration file allows jane to run /bin/kill, /bin/id, or /sbin/fdisk as root on any host, but with different password requirements. Specifically:
Jane can run /bin/kill without specifying a password, because the tag_list is NOPASSWD for this command. This means that jane can execute sudo /bin/kill and the command will run as root without asking for any password. This makes option D true.
Jane can run /bin/id without specifying a password, because the tag_list is also NOPASSWD for this command. This means that jane can execute sudo /bin/id and the command will run as root without asking for any password. This makes option E true.
Jane can run /sbin/fdisk after specifying her password, because the tag_list is PASSWD for this command. This means that jane can execute sudo /sbin/fdisk and the command will ask for jane's password before running as root. This makes option C true.
The other options are false because:
Jane cannot run /bin/id only after specifying her password, because the tag_list is NOPASSWD for this command. This makes option A false.
Jane cannot run /sbin/fdisk after specifying root's password, because the password that is required is jane's password, not root's password. This makes option B false.
Reference:
LPI Linux Essentials: 1.4. Using sudo
LPI Linux Administrator: 102.5. Use Debian package management
LPI Linux Engineer: 201.1. Measure and Troubleshoot Resource Usage
LPI Linux Professional Certification Program


NEW QUESTION # 133
Which of the following lines are valid in the file /etc/hosts? (Choose TWO correct answers.)

  • A. 2001:db8::15 www.example.com www
  • B. 2003.0.113.15,2001:db8::15 www.example.com www
  • C. 203.0.113.15 www.example.com www
  • D. www.example.com www 203.0.13.15
  • E. www.example.com,www 203.0.13.15,2001:db8::15

Answer: A,C

Explanation:
The valid lines in the file /etc/hosts are A and C. The format of the /etc/hosts file is as follows12:
IP_address canonical_hostname [aliases...]
where IP_address is the IPv4 or IPv6 address of the host, canonical_hostname is the official name of the host, and aliases are optional alternative names for the host. Each field is separated by whitespace (spaces or tabs).
The # character indicates the beginning of a comment, and the rest of the line is ignored.
The lines B, D, and E are invalid because they do not follow the format of the /etc/hosts file. Line B has the hostname and aliases before the IP address, which is incorrect. Line D has multiple IP addresses and hostnames separated by commas, which is also incorrect. Line E has two IP addresses for the same host, which is not supported by the /etc/hosts file. If a host has more than one IP address, it should have a separate line for each address3.
References:
* 1: hosts(5) - Linux manual page - man7.org
* 2: Format of /etc/hosts on Linux (different from Windows?)
* 3: hosts File Format for TCP/IP - IBM


NEW QUESTION # 134
FILL BLANK
Which file, if present, must contain all users that are allowed to use the cron scheduling system? (Specify the full name of the file, including path.)

Answer:

Explanation:
crontab


NEW QUESTION # 135
In case neither cron.allow nor cron.deny exist in /etc/, which of the following is true?

  • A. When a user creates a user specific crontab the system administrator must approve it explicitly.
  • B. Without additional configuration, no users may have user specific crontabs.
  • C. The cron daemon will refuse to start and report missing files in the system's logfile.
  • D. Without additional configuration, all users may have user specific crontabs.

Answer: D

Explanation:
The /etc/cron.allow and /etc/cron.deny files are used to control access to the crontab command and cron jobs for individual users. If neither of these files exists, then depending on site-dependent configuration parameters, only the superuser (root user) will be allowed to use this command, or all users will be able to use this command1. The default behavior of most Linux distributions is to allow all users to use the crontab command and have user specific crontabs if neither /etc/cron.allow nor /etc/cron.deny exists23. Therefore, option B is the correct answer. The other options are not true because:
* Option A is false because it contradicts the default behavior of most Linux distributions.
* Option C is false because the cron daemon will not refuse to start or report missing files in the system's logfile if neither /etc/cron.allow nor /etc/cron.deny exists. The cron daemon will start normally and use the default configuration parameters1.
* Option D is false because the system administrator does not need to approve user specific crontabs explicitly. The user can create, edit, display, or remove their own crontab files without any intervention from the system administrator1. References:
* How cron.allow and cron.deny can be used to limit access to crontab for a particular user | The Geek Search
* crontab(1) - cron - Debian bullseye - Debian Manpages
* Controlling Access to crontab (System Administration Guide: Basic Administration) - Oracle
* /etc/cron.allow - Linux Bash Shell Scripting Tutorial Wiki - nixCraft


NEW QUESTION # 136
FILL BLANK
Which parameter of the ssh command specifies the location of the private key used for login attempts?
(Specify only the option name without any values or parameters.)

Answer:

Explanation:
ssh-keygen


NEW QUESTION # 137
Which of the following commands should be executed when starting a login shell in order to change the language of messages for an internationalized program to Portuguese (pt)?

  • A. export ALL_MESSAGES="pt"
  • B. export LANGUAGE="pt"
  • C. export MESSAGE="pt"
  • D. export UI_MESSAGES="pt"
  • E. export LC_MESSAGES="pt"

Answer: E


NEW QUESTION # 138
Which crontab entry could be used to set the system time at regular intervals?

  • A. 1 0 * * * runcron date ntp1.digex.net
  • B. 1 0 * * * date $d $t $24
  • C. 1 0 * * * date ntp1.digex.net
  • D. 1 0 * * * settime $d $t $24
  • E. 1 0 * * * ntpdate ntp1.digex.net

Answer: E


NEW QUESTION # 139
Depending on a system's configuration, which of the following files can be used to enable and disable network services running on this host?

  • A. /etc/host.conf
  • B. /et/host.conf
  • C. /etc/xinetd.conf
  • D. /etc/ports
  • E. /etc/profile

Answer: C

Explanation:
The file that can be used to enable and disable network services running on this host is /etc/xinetd.conf. This file is the main configuration file for the xinetd daemon, which is a super-server that can start other network services on demand. The /etc/xinetd.conf file contains global settings and a list of services that xinetd can manage. Each service has its own configuration section, which can include the disable keyword to enable or disable the service. For example, to disable the telnet service, the configuration section would look like this12:
service telnet
{
disable = yes
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
The other files are not related to network services. The /etc/profile file is a global configuration file for the Bash shell, which sets environment variables and aliases for all users3. The /etc/ports file does not exist by default in Linux, and it is not a standard file for network configuration. The /et/host.conf file is a typo, and it should be /etc/host.conf, which is a file that controls the behavior of the resolver library, which is used to look up host names and IP addresses4. The /etc/host.conf file is not used to enable or disable network services, but to specify the order of host name resolution methods5. Reference:
1: How to enable or disable services with xinetd - LinuxConfig.org
2: xinetd.conf(5) - Linux manual page - man7.org
3: What is /etc/profile file in Linux? - LinuxForDevices
4: host.conf(5) - Linux manual page - man7.org
5: Linux host.conf file - Computer Notes


NEW QUESTION # 140
Which command is used to set the hostname of the local system? (Specify ONLY the command without any path or parameters.)

Answer:

Explanation:
hostname
Explanation:
The hostname command is used to set the hostname of the local system. The hostname command can take a single argument, which is the new hostname to be assigned to the system. For example, to set the hostname to linux, one can run:
hostname linux
The hostname command can also be used without any arguments to display the current hostname of the system. For example, to show the current hostname, one can run:
hostname
The hostname command only changes the hostname temporarily, meaning that the original hostname will be restored after a reboot. To change the hostname permanently, one has to edit the configuration files that store the hostname information, such as /etc/hostname, /etc/hosts, /etc/sysconfig/network, etc. The exact files and commands may vary depending on the Linux distribution and the system initialization process. For more details, please refer to the web search results1 or the question answering results2. References:


NEW QUESTION # 141
On a Linux system with shadow passwords enabled, which file in the file system contains the password hashes of all local users? (Specify the full name of the file, including path.)

Answer:

Explanation:
/etc/shadow
Explanation:
On a Linux system with shadow passwords enabled, the file that contains the password hashes of all local users is /etc/shadow. This file is a replacement for the password field in /etc/passwd, which is a world-readable file that contains basic information about users. The /etc/shadow file is not readable by regular users, and it stores the encrypted passwords (or hashes) of each user, along with other information such as password expiration dates, minimum and maximum password ages, and password warning periods. The /etc/shadow file has nine colon-delimited fields for each user:
* Username: The name used when the user logs into the system.
* Password: The encrypted password of the user, or a special character that indicates the password status.
For example, an asterisk (*) means the account is locked, and an exclamation mark (!) means the password is expired.
* Last Password Change: The date of the last password change, expressed as the number of days since January 1, 1970.
* Minimum Password Age: The minimum number of days required between password changes. A zero means the password can be changed anytime.
* Maximum Password Age: The maximum number of days the password is valid. After this number of days, the password must be changed. A zero means the password never expires.
* Password Warning Period: The number of days before the password expires that the user will be warned. A zero means no warning is given.
* Password Inactivity Period: The number of days after the password expires that the account will be disabled. A negative value means the account is never disabled.
* Account Expiration Date: The date when the account will be disabled, expressed as the number of days since January 1, 1970. A zero means the account never expires.
* Reserved Field: A field for future use.
The /etc/shadow file can be modified by using the commands passwd and chage, which are used to change the password and the password aging information of a user, respectively. The /etc/shadow file should not be edited directly, but always through the tools provided by the distribution. For more details, see the shadow manual page.
References:
* LPIC-1 Exam 102 Objectives, Topic 110: Security, Subtopic 110.2: Use sudo to manage access to the root account, Weight: 2, Key Knowledge Areas: Configure sudo and sudoers. Use sudo to execute commands as another user.
* LPIC-1 Exam 102 Learning Materials, Topic 110: Security, Subtopic 110.2: Use sudo to manage access to the root account, Section 110.2.1: sudo and sudoers, Page 3-5.


NEW QUESTION # 142
What command should be used to print a listing of email in the system's mail queue?

  • A. mailq
  • B. mlq
  • C. lpq
  • D. sendmail -l

Answer: A

Explanation:
The mailq command prints the list of messages that are in the mail queue. The mail queue is where outgoing mail is stored until a receiving server connection is available. The mailq command is the same as the sendmail -bp command, which also prints the mail queue. The mailq command is part of the topic 108.3: Mail transfer agent (MTA) basics, which is one of the objectives of the LPI Linux Administrator - 102 exam12. Reference: 1: https://learning.lpi.org/en/learning-materials/102-500/ 2: https://www.lpi.org/our-certifications/exam-102-objectives/


NEW QUESTION # 143
Your senior systems administrator asks you to set up a new machine with Apache listening on port 8088.
Which Apache config file would you edit to change the default port to 8088?

  • A. inet.conf
  • B. srm.conf
  • C. access.conf
  • D. httpd.conf

Answer: D


NEW QUESTION # 144
Which of the following entries in /etc/syslog.conf writes all mail related events to the file /var/log/maillog and sends all critical events to the remote server logger.example.com?

Answer: A


NEW QUESTION # 145
What keyword is missing from this code sample of a shell script?
____ i in *.txt; do
echo $i
done

  • A. while
  • B. loop
  • C. for
  • D. until

Answer: B

Explanation:
The set command is used to display or modify the shell variables and functions in the current shell. When used without any arguments, it prints the names and values of all shell variables, including environment variables and user-defined variables, in alphabetical order. The output also includes the shell options and the positional parameters. The set command can be used in any POSIX-compliant shell, such as bash, zsh, ksh, etc123.
The other options are not correct because:
* env is used to print or modify the environment variables, not the shell variables. It does not show the user-defined variables or the shell options. It can also be used to run a command in a modified environment45.
* env -a is an invalid option for the env command. The -a option is not supported by the env command in any standard or common implementation45.
* echo $ENV is used to print the value of the environment variable ENV, not the list of all shell variables.
The ENV variable is usually set to the name of a file that contains commands or aliases to be executed by the shell. It is mainly used by the ksh and some versions of bash .
References: 1: How can I list all shell variables? - Unix & Linux Stack Exchange 2: 2.1 Command Line Basics
- Linux Professional Institute Certification ... 3: set - The Open Group Base Specifications Issue 7, 2018 edition 4: How to set and list environment variables on Linux 5: env - The Open Group Base Specifications Issue 7, 2018 edition : What is the difference between .bash_profile and .bashrc? - Unix & Linux Stack Exchange : ENV - The Open Group Base Specifications Issue 7, 2018 edition


NEW QUESTION # 146
Which parameter must be passed to ifconfig to activate a previously inactive network interface? (Specify the parameter only without any command, path or additional options)

Answer:

Explanation:
up
Explanation:
The parameter that must be passed to ifconfig to activate a previously inactive network interface is up. The up parameter tells the kernel to activate the network interface and allow it to send and receive packets. The opposite of up is down, which deactivates the network interface. The up parameter is part of the topic 109.2: Basic network configuration, which is one of the objectives of the LPI Linux Administrator - 102 exam12. Reference: 1: https://learning.lpi.org/en/learning-materials/102-500/ 2: https://www.lpi.org/our-certifications/exam-102-objectives/


NEW QUESTION # 147
Given the following excerpt of the sudoconfiguration:
jane ANY=NOPASSWD: /bin/kill, /bin/id, PASSWD: /sbin/fdisk
Which of the following statements are true? (Choose three.)

  • A. Jane can run /sbin/fdisk after specifying root's password.
  • B. Jane can run /bin/killwithout specifying a password.
  • C. Jane can run /sbin/fdiskafter specifying her password.
  • D. Jane can run /bin/idwithout specifying her password.
  • E. Jane can run /bin/idonly after specifying her password.

Answer: B,C,D


NEW QUESTION # 148
The presence of what file will temporarily prevent all users except root from logging into the system? (Specify the full name of the file, including path.)

Answer:

Explanation:
etcnologin
Explanation:
The /etc/nologin file is used to prevent all users except root from logging into the system. This file is usually created by the system administrator when the system is going down for maintenance or reboot. The file can contain a message that is displayed to the users who try to log in, explaining the reason for the system shutdown. The file is automatically removed by the system when it boots up again. Reference:
LPI 102-500 Exam Objectives, Topic 104: Administrative Tasks, 104.5 Manage user accounts LPI 102-500 Study Guide, Chapter 4: User and Group Management, Section 4.3: Preventing Users from Logging In


NEW QUESTION # 149
What is true regarding a default route?

  • A. The default route is always used first. When the default route is not available more specific routes are tried.
  • B. The default route is only used if there is not a more specific route to a destination host or network.
  • C. When a default route is set, all other routes are disabled until the default route is deleted.
  • D. Without a default route, no network communication even in directly attached networks is possible.

Answer: B


NEW QUESTION # 150
What output will the following command produce?
seq 1 5 20

  • A. 1
    5
    10
    15
  • B. 1
    6
    1
    1
    1
    6
  • C. 1
    2
    3
    4
  • D. 5
    10
    15
    20
  • E. 2
    3
    4
    5

Answer: B


NEW QUESTION # 151
With IPv6, how many bits have been used for the interface identifier of an unicast address?
(Specify the number using digits only.)

Answer:

Explanation:
64


NEW QUESTION # 152
Which file, when using Sendmail or a similar MTA system, will allow a user to redirect all their mail to another address and is configurable by the user themselves?

  • A. /etc/mail/forwarders
  • B. /etc/alias
  • C. ~/.forward
  • D. ~/.alias
  • E. ~/.vacation

Answer: C


NEW QUESTION # 153
Which command makes the shell variable named VARIABLE visible to subshells?

  • A. set $VARIABLE
  • B. set VARIABLE
  • C. export VARIABLE
  • D. export $VARIABLE
  • E. env VARIABLE

Answer: C

Explanation:
The export command makes the shell variable named VARIABLE visible to subshells. This means that any child process that is spawned from the current shell will inherit the value of VARIABLE. The export command does not need a dollar sign ($) before the variable name, as that would expand the variable to its value. The set command only affects the current shell and does not export the variable to subshells. The env command can be used to run a command in a modified environment, but it does not export the variable to subshells either. Reference:
[LPI Linux Essentials - Topic 105: Shells, Scripting and Data Management]
[LPI Linux Administrator - Exam 102 Objectives - Topic 105: Shells and Shell Scripting]


NEW QUESTION # 154
Which directory holds the files that configure the xinetd service when using several configuration files instead of an integrated configuration file? (Specify the full path to the directory.)

Answer:

Explanation:
/etc/xinetd.d/, /etc/xinetd.d
Explanation:
The /etc/xinetd.d/ directory holds the files that configure the xinetd service when using several configuration files instead of an integrated configuration file. Each file in this directory corresponds to a specific service that is managed by xinetd, such as telnet, ftp, ssh, etc. The name of the file matches the name of the service. The files in this directory contain service-specific options that override or supplement the global options defined in the /etc/xinetd.conf file. The files are read only when the xinetd service is started, so any changes require a restart of the service. The /etc/xinetd.d/ directory allows for a modular and flexible configuration of the xinetd service, as well as easier management and maintenance of the individual service files. References:
* How to configure xinetd ? - Red Hat Customer Portal
* Understanding /etc/xinetd.d directory under Linux
* xinetd - Wikipedia


NEW QUESTION # 155
Given the following excerpt of the sudo configuration:
jane ANY=NOPASSWD: /bin/kill, /bin/id, PASSWD: /sbin/fdisk
Which of the following statements are true? (Choose three.)

  • A. Jane can run /sbin/fdisk after specifying root's password.
  • B. Jane can run /bin/id only after specifying her password.
  • C. Jane can run /bin/id without specifying her password.
  • D. Jane can run /bin/kill without specifying a password.
  • E. Jane can run /sbin/fdisk after specifying her password.

Answer: C,D,E


NEW QUESTION # 156
......


Administrative tasks

Students who want to pass the LPI 102-500 exam are also expected to handle the following;

  • Automate system administration activities with the help of jobs and their scheduling;
  • Localization in addition to internationalization;
  • Manage, transform, and delete group & user accounts and associated system files;
  • Control cron & at jobs and configure user access to them;

 

Top Lpi 102-500 Courses Online: https://actualtests.prep4away.com/Lpi-certification/braindumps.102-500.ete.file.html