Back to cert prep

Practice area

LPIC-1 102: Administrative Tasks

Manage identity and scheduled work carefully while understanding locale and timezone settings that change command output.

Linux One Liners is an independent study and practice resource. It is not affiliated with, endorsed by, or approved by LPI, The Linux Foundation, CompTIA, or any certification provider. This site does not provide exam dumps or real exam questions.

Source status

Source status: LPI LPIC-1 overview verified July 3, 2026. Current version 5.0; exams 101-500 and 102-500.

This page paraphrases study areas into command practice. It does not copy official objective text wholesale and is not an exam dump.

Plain-English goal

Practice area: users, groups, account files, scheduled tasks, localization, language, and timezones. Exam/domain: 102-500.

read the situation

Command, output, and next step

Command anatomy

id app 2>/dev/null || true; getent passwd app 2>/dev/null || true; getent group | head
namei -l
show permissions for each path component
stat
show owner, group, mode, and timestamps
id
show the user and group context
target
the exact path or account under review

Annotated output

f: /srv/app/current/.env
drwxr-xr-x root root /
drwxr-xr-x root root srv
drwxr-x--- deploy www-data app
drwxr-x--- deploy www-data current
-rw------- deploy deploy .env

uid=33(www-data) gid=33(www-data) groups=33(www-data)

What to notice

each path segment
where traversal can fail
mode
which read/write/execute bits exist
owner/group
who can access the object
effective user
which account the service actually uses

Safe vs unsafe move

Common wrong move

Only checking the final file and missing an execute bit on a parent directory.

Next safe command

systemctl show nginx -p User -p Group

Troubleshooting ladder

  1. Name the symptom.
  2. Inspect read-only state.
  3. Find the owner, service, file, device, mount, or route.
  4. Read the decisive output field.
  5. Choose the next narrow command.
  6. Avoid broad or destructive changes.
  7. Make the smallest justified change if required.
  8. Verify and record what changed.

How to get help

  1. Know the commandUse command --help, then man command for the full reference.
  2. Know the conceptUse apropos keyword or man -k keyword to discover command names.
  3. Maybe a shell builtinUse type command, command -V command, then help command.
  4. Service behaviorUse systemctl status service and journalctl -u service before restarting.
  5. Package ownershipUse dpkg -S, rpm -qf, or the distro package tool for the installed file.

Study plan

  1. Start every identity task with read-only proof: id, getent, login shell, group membership, password aging, and sudo exposure.
  2. Practice user and group lifecycle commands in a lab, including locked accounts, nologin shells, supplementary groups, and home directories.
  3. Map scheduled jobs from user crontabs, system cron paths, anacron-style directories, at jobs, and timer awareness.
  4. Review locale, encoding, language, and timezone because they affect date output, sort order, messages, and scripts.

Command labs

Run these in a lab shell or disposable machine first. The point is to explain the output, not just memorize the command.

Inspect account and groups

id app 2>/dev/null || true; getent passwd app 2>/dev/null || true; getent group | head

Account IDs, groups, shells, and group records should be visible before changes.

Annotated output
f: /srv/app/current/.env
drwxr-xr-x root root /
drwxr-xr-x root root srv
drwxr-x--- deploy www-data app
drwxr-x--- deploy www-data current
-rw------- deploy deploy .env

uid=33(www-data) gid=33(www-data) groups=33(www-data)

What to notice: each path segment, mode, owner/group, effective user.

Next safe command: systemctl show nginx -p User -p Group

Map cron jobs

crontab -l 2>/dev/null; find /etc/cron* -maxdepth 2 -type f -print 2>/dev/null | sort | head -40

User and system scheduled job locations should be visible.

Annotated output
Usage: command [OPTION]... TARGET
Try 'command --help' for common flags.
Try 'man command' for full reference.

What to notice: Usage, --help, man.

Next safe command: command --help

Check locale and time settings

locale | sed -n '1,12p'; timedatectl 2>/dev/null | sed -n '1,12p'

Language, encoding, timezone, and clock sync clues should be readable.

Annotated output
Usage: command [OPTION]... TARGET
Try 'command --help' for common flags.
Try 'man command' for full reference.

What to notice: Usage, --help, man.

Next safe command: command --help

command families

Commands to practice

  • useradd
  • usermod
  • groupadd
  • passwd
  • chage
  • id
  • getent
  • crontab
  • at
  • locale
  • timedatectl

Related drills

Flashcards

What does getent passwd show that is useful before user changes?

The account record, UID/GID, home directory, and login shell from configured name services.

Why inspect supplementary groups?

Group membership often controls access to files, sudo, devices, containers, or services.

Why can locale break scripts?

It can change sort order, messages, date formats, and character handling.

Why prefer full paths in scheduled jobs?

Cron and timers may run with a different PATH than interactive shells.

Quick quiz

Check the reasoning locally in your browser. Answers are not sent anywhere.

Which command reads an account through configured name services?
Show answer

Answer: getent passwd user

Why: getent uses NSS sources instead of only one local file.

  • mkfs user: That destroys or removes state before the evidence is understood.
  • iptables user: That does not answer the question the output is asking you to prove first.
  • tar user: That does not answer the question the output is asking you to prove first.
Which tool reviews password aging?
Show answer

Answer: chage -l user

Why: chage reports password aging policy.

  • df -h: That does not answer the question the output is asking you to prove first.
  • lsusb: That does not answer the question the output is asking you to prove first.
  • dig: That does not answer the question the output is asking you to prove first.
Which setting can change sort behavior and date formatting?
Show answer

Answer: locale

Why: Locale affects language, encoding, collation, and formatting.

  • inode count: That does not answer the question the output is asking you to prove first.
  • packet TTL: That does not answer the question the output is asking you to prove first.
  • SUID bit: That does not answer the question the output is asking you to prove first.

Self-test before moving on