LPIC-1 102-500 study materials
LPIC-1 102-500 study resources

LPIC-1 102-500: Administrative Tasks

LPIC-1 102-500 · Work through your exam, one topic at a time.

All guide sections

Administrative Tasks

What the exam tests

Administrative Tasks covers account and group management, job scheduling with cron, anacron, and systemd timers, and localization and time-zone configuration. Expect file-format and command-option questions.

Core rules

  • User database: /etc/passwd fields are name:password-placeholder:UID:GID:GECOS:home:shell; /etc/shadow stores hashes and aging; /etc/group and /etc/gshadow store groups. useradd -m -s /bin/bash -G sudo alice, usermod -aG, userdel -r, groupadd, passwd, and chage -l are core commands.
  • Defaults live in /etc/default/useradd, /etc/login.defs, and /etc/skel. adduser is a distro-friendly wrapper; useradd is lower level.
  • cron uses five fields: minute, hour, day-of-month, month, day-of-week. In /etc/crontab and /etc/cron.d/* a user field follows; personal crontabs omit it and are edited with crontab -e, listed with -l, removed with -r. @reboot runs at boot. anacron runs missed jobs on systems not always on; systemd timers use a .timer plus .service.
  • Locale: LANG, LC_*, and LC_ALL; use locale, localectl, and localedef. Time zone: timedatectl set-timezone, /etc/timezone, and /etc/localtime as a symlink to /usr/share/zoneinfo/....

Worked example

Run /usr/local/bin/rotate at 02:30 on weekdays as root: 30 2 * * 1-5 root /usr/local/bin/rotate Reasoning: field 1 is minute 30, field 2 hour 2, * every day-of-month, * every month, and 1-5 Monday through Friday. In /etc/crontab the user field is required; in a personal crontab it is omitted. The script should use absolute paths because cron's PATH is minimal.

Traps

crontab -r removes the whole crontab without confirmation. % in a crontab command is special unless escaped. The day-of-month and day-of-week fields are ORed when both are restricted. usermod -G replaces supplementary groups; use -aG. Deleting a user without -r leaves the home directory. LC_ALL overrides all other locale variables. Setting the clock manually with timedatectl may conflict with a running NTP service; disable synchronization first.