Free 102-500 Exam Braindumps
LPIC-1 Exam 102, Part 2 of 2, version 5.0 Questions 56–60 (page: 13)

Updated On: 10-Feb-2026

Which file contains the date of the last change of a user's password?

  1. /etc/gshadow
  2. /etc/passwd
  3. /etc/pwdlog
  4. /etc/shadow
  5. /var/log/shadow

Answer(s): D

Explanation:

The /etc/shadow file contains the encrypted passwords and other information for each user account on a Linux system. The third field in each line of this file is the date of the last password change, expressed as the number of days since Jan 1, 1970. This information is used by the system to determine when a user must change their password, based on the password aging policy. The /etc/shadow file can be viewed and modified by the root user or by using the chage command123. The other files listed in the options do not store the date of the last password change. The /etc/gshadow file contains the encrypted passwords for group accounts4. The /etc/passwd file contains the basic information for each user account, such as the user name, user ID, group ID, home directory, login shell, etc., but not the password5. The /etc/pwdlog file does not exist by default on most Linux systems, and it is not related to the password change date. The /var/log/shadow file also does not exist by default on most Linux systems, and it is not related to the password change date.


Reference:

https://www.redhat.com/sysadmin/password-changes-chage-command https://www.golinuxcloud.com/check-last-password-change-expiration-linux/



Which environment variable should be set in order to change the time zone for the commands run from within the environment variable's scope? (Specify the variable name only.)

  1. T, Z

Answer(s): A

Explanation:

The TZ environment variable is used to change the time zone for the commands run from within the environment variable's scope. It specifies the name of a time zone as defined in the /usr/share/zoneinfo directory or a custom time zone in the POSIX format12. The TZ variable can be set either globally in a shell profile file or locally in a shell session. For example, to set the time zone to America/New_York for the current shell session, one can use the following command:
export TZ=America/New_York
To verify the change, one can use the date command to display the current date and time according to the TZ variable. The TZ variable can also be used to run a single command with a different time zone without affecting the system's time zone. For example, to run the date command with the Asia/Tokyo time zone, one can use the following syntax:
TZ=Asia/Tokyo date
The TZ variable is useful for testing how applications behave in different time zones or for displaying the time in different locations34.


Reference:

How to Set or Change the Time Zone in Linux | Linuxize
Linux / UNIX: TZ Environment Variable - nixCraft
Get Current System Time Zone in Linux | Baeldung on Linux Setting the TZ Environment Variable on Linux | InterSystems Developer



Each entry in a crontab must end with what character?

  1. Tab
  2. Space
  3. Backslash
  4. Newline

Answer(s): D

Explanation:

Each entry in a crontab file consists of six fields, specifying in the following order: minute, hour, day, month, weekday, and command1. Any of these fields can be set to an asterisk (*), which stands for "first through last." So, for example, to run a job every hour, put * in the hour field1. Each entry in a crontab file must end with a newline character (\n), which indicates the end of a line2. A newline character is created by pressing the Enter key on the keyboard. The other options are not valid characters for ending a crontab entry. A tab or a space is used to separate each field, and a backslash is used to escape special characters or continue a long command to the next line2.


Reference:

How to Use the Cron Job Format to Schedule Task in Linux Syntax of crontab File Entries - Oracle.



To prevent a specific user from scheduling tasks with at, what should the administrator do?

  1. Add the specific user to /etc/at.allow file.
  2. Add the specific user to [deny] section in the /etc/atd.conf file.
  3. Add the specific user to /etc/at.deny file.
  4. Add the specific user to nojobs group.
  5. Run the following: atd --deny [user].

Answer(s): C

Explanation:

The /etc/at.deny file is a file that contains a list of users who are not allowed to use the at command to schedule jobs. If the file exists, any user who is not in the /etc/at.allow file and is in the /etc/at.deny file will be denied access to the at command. To prevent a specific user from scheduling tasks with at, the administrator can simply add the user's name to the /etc/at.deny file. For example, to prevent the user bob from using the at command, the administrator can use the following command:
echo "bob" | sudo tee -a /etc/at.deny
The other options are not correct. The /etc/at.allow file is a file that contains a list of users who are allowed to use the at command. Adding a user to this file will not prevent them from scheduling tasks with at. The /etc/atd.conf file is a configuration file for the at daemon, which does not have a [deny] section. Adding a user to this file will not affect their access to the at command. The nojobs group is not a predefined group in Linux, and adding a user to this group will not prevent them from scheduling tasks with at. The atd command does not have a --deny option, and running this command will not prevent a user from scheduling tasks with at.


Reference:

at Command in Linux with Examples - GeeksforGeeks
How to Use the Linux at Command {9 Examples} - phoenixNAP at(1) - Linux man page



Which of the following crontab entries will execute myscript at 30 minutes past every hour on Sundays?

  1. 0 * * * 30 myscript
  2. 30 * * * 6 myscript
  3. 30 0 * * 0 myscript
  4. 30 0-23 * * 0 myscript
  5. 0 0-23 * * 30 myscript

Answer(s): D

Explanation:

The correct crontab entry for executing myscript at 30 minutes past every hour on Sundays is D. 30 0- 23 * * 0 myscript. This is because the crontab format consists of six fields: minute, hour, day of month, month, day of week, and command. The values for each field can be:
A single number, such as 5 or 10.
A range of numbers, such as 1-5 or 10-15.
A list of numbers separated by commas, such as 1,3,5 or 10,12,14. An asterisk (*), which means all possible values for that field. A step value, which means every nth value for that field, such as */5 or 10-20/2. The day of week field can be either a number from 0 to 6, where 0 and 7 are Sunday, or a three-letter abbreviation, such as SUN or MON. The month field can be either a number from 1 to 12, or a three- letter abbreviation, such as JAN or FEB.
In this case, the crontab entry D. 30 0-23 * * 0 myscript means:

30: Execute the command at the 30th minute of every hour. 0-23: Execute the command for every hour from 0 (midnight) to 23 (11 PM).
*: Execute the command for every day of the month, regardless of the month.
*: Execute the command for every month, regardless of the year.
0: Execute the command only on Sundays.
The other options are either incorrect or do not match the requirement. For example, option A. 0 * *
* 30 myscript means:
0: Execute the command at the 0th minute of every hour.
*: Execute the command for every hour of the day.
*: Execute the command for every day of the month, regardless of the month.
*: Execute the command for every month, regardless of the year.
30: Execute the command only on the 30th day of the week, which is invalid.


Reference:

Crontab Explained in Linux [With Examples]
`crontab' in Linux with Examples - GeeksforGeeks
Crontab Syntax on Linux + Useful Examples - Hostinger



Viewing page 13 of 48
Viewing questions 61 - 65 out of 234 questions


Post your Comments and Discuss LPI 102-500 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!