{ "$schema": "../schema/questions.schema.json", "format": "lpic-sim-questions", "meta": { "file": "questions_108.json", "brief": "Fragen zu Topic 108 Grundlegende Systemdienste (LPIC-1 102-500, Objectives 5.0)", "author": "Björn Runden ", "owner": "Björn Runden ", "assist": "KI-unterstützt (Claude Opus 5.5), geprüft von Björn Runden ", "version": "0.1.0 (29.10.2026)" }, "exam": "lpic1-102", "questions": [ { "id": "108.1-001", "objective": "108.1", "type": "single", "difficulty": 1, "question": "Die Systemzeit ist korrekt. Mit welchem Befehl überträgt man sie in die Hardware-Uhr (RTC)?", "options": [ { "id": "a", "text": "`hwclock --systohc`", "correct": true, "explanation": "system to hardware clock: Systemzeit → RTC." }, { "id": "b", "text": "`hwclock --hctosys`", "correct": false, "explanation": "Umgekehrte Richtung: RTC → Systemzeit (passiert beim Start)." }, { "id": "c", "text": "`hwclock --show`", "correct": false, "explanation": "Zeigt die Zeit der Hardware-Uhr nur an." }, { "id": "d", "text": "`date -s now`", "correct": false, "explanation": "`date -s` stellt die Systemzeit, nicht die Hardware-Uhr." }, { "id": "e", "text": "`timedatectl set-ntp true`", "correct": false, "explanation": "Aktiviert die NTP-Synchronisation der Systemzeit." } ], "explanation": "Linux führt eine Systemuhr (Kernel) und die batteriegepufferte Hardware-Uhr. Ob die RTC in UTC oder Ortszeit läuft, zeigt `timedatectl` (RTC in local TZ).", "references": ["man 8 hwclock"] }, { "id": "108.1-002", "objective": "108.1", "type": "single", "difficulty": 2, "question": "Auf einem System läuft `chronyd`. Welcher Befehl zeigt die konfigurierten Zeitquellen und deren Zustand?", "options": [ { "id": "a", "text": "`chronyc sources`", "correct": true, "explanation": "Listet die Quellen; `*` markiert die aktuell gewählte. `chronyc tracking` zeigt die Abweichung." }, { "id": "b", "text": "`ntpq -p`", "correct": false, "explanation": "`ntpq -p` gehört zum klassischen `ntpd` und fragt dessen Peers ab." }, { "id": "c", "text": "`chronyd -q`", "correct": false, "explanation": "Stellt die Uhr einmalig und beendet sich (ähnlich `ntpdate`)." }, { "id": "d", "text": "`timedatectl timesync-status`", "correct": false, "explanation": "Zeigt den Status von `systemd-timesyncd`, nicht von chrony." }, { "id": "e", "text": "`hwclock -r`", "correct": false, "explanation": "Liest nur die Hardware-Uhr." } ], "explanation": "Konfiguration: `/etc/chrony.conf` bzw. `/etc/chrony/chrony.conf` (Debian), beim klassischen ntpd `/etc/ntp.conf`.", "references": ["man 1 chronyc"] }, { "id": "108.1-003", "objective": "108.1", "type": "fill", "difficulty": 1, "question": "Geben Sie den `timedatectl`-Befehl ein, der die automatische Zeitsynchronisation per NTP einschaltet.", "answers": ["timedatectl set-ntp true", "timedatectl set-ntp yes", "timedatectl set-ntp on", "timedatectl set-ntp 1"], "explanation": "`timedatectl` ohne Argumente zeigt u. a. `NTP service: active` und `System clock synchronized`.", "references": ["man 1 timedatectl"] }, { "id": "108.1-004", "objective": "108.1", "type": "multi", "difficulty": 1, "question": "Welche Aussagen zum Network Time Protocol (NTP) treffen zu?", "options": [ { "id": "a", "text": "NTP verwendet UDP-Port 123.", "correct": true, "explanation": "Sowohl Client als auch Server nutzen Port 123/udp." }, { "id": "b", "text": "`pool.ntp.org` ist ein öffentlicher Verbund von NTP-Servern.", "correct": true, "explanation": "Über DNS werden wechselnde Server aus dem Pool vergeben." }, { "id": "c", "text": "NTP verwendet TCP-Port 123.", "correct": false, "explanation": "NTP läuft über UDP." }, { "id": "d", "text": "`ntpdate` gleicht die Uhr dauerhaft und kontinuierlich ab.", "correct": false, "explanation": "`ntpdate` stellt die Uhr einmalig und ist veraltet." }, { "id": "e", "text": "`date` ohne Optionen stellt die Uhr nach einem Zeitserver.", "correct": false, "explanation": "`date` ohne Optionen zeigt nur Datum und Uhrzeit an." } ], "explanation": "Begriffe: Stratum (Abstand zur Referenzuhr), Offset, Drift. NTP-Implementierungen: ntpd, chrony, systemd-timesyncd (nur Client).", "references": ["RFC 5905"] }, { "id": "108.2-001", "objective": "108.2", "type": "single", "difficulty": 1, "question": "Wie zeigt man alle Journal-Meldungen der systemd-Unit `ssh.service` an?", "options": [ { "id": "a", "text": "`journalctl -u ssh.service`", "correct": true, "explanation": "`-u` filtert nach Unit." }, { "id": "b", "text": "`journalctl -k ssh.service`", "correct": false, "explanation": "`-k` zeigt nur Kernel-Meldungen." }, { "id": "c", "text": "`journalctl -b ssh.service`", "correct": false, "explanation": "`-b` filtert nach Boot; der Unit-Name würde als Feldfilter missverstanden." }, { "id": "d", "text": "`systemctl log ssh.service`", "correct": false, "explanation": "`systemctl` hat keinen Unterbefehl `log`; `systemctl status` zeigt nur die letzten Zeilen." }, { "id": "e", "text": "`journalctl -p ssh.service`", "correct": false, "explanation": "`-p` filtert nach Priorität, z. B. `-p err`." } ], "explanation": "Kombinierbar: `journalctl -u ssh -b -p warning --since \"1 hour ago\"`.", "references": ["man 1 journalctl"] }, { "id": "108.2-002", "objective": "108.2", "type": "fill", "difficulty": 1, "question": "Welche `journalctl`-Option zeigt neu eintreffende Meldungen fortlaufend an (wie `tail -f`)? (nur die Option)", "answers": ["-f", "--follow"], "explanation": "`journalctl -f` folgt dem Journal; `-n 50` zeigt zuvor die letzten 50 Zeilen.", "references": ["man 1 journalctl"] }, { "id": "108.2-003", "objective": "108.2", "type": "single", "difficulty": 2, "question": "Was bewirkt die rsyslog-Regel `mail.err /var/log/mail.err`?", "options": [ { "id": "a", "text": "Meldungen der Facility `mail` mit Priorität `err` **und höher** landen in der Datei.", "correct": true, "explanation": "Eine Priorität ohne Zusatz bedeutet: diese und alle schwerwiegenderen." }, { "id": "b", "text": "Nur Meldungen der Facility `mail` mit genau der Priorität `err` landen in der Datei.", "correct": false, "explanation": "Genau eine Priorität: `mail.=err`." }, { "id": "c", "text": "Alle Meldungen der Facility `mail` landen in der Datei.", "correct": false, "explanation": "Das wäre `mail.*`." }, { "id": "d", "text": "Fehlermeldungen aller Facilities landen in der Datei.", "correct": false, "explanation": "Das wäre `*.err`." }, { "id": "e", "text": "Mail-Fehler werden per E-Mail an root geschickt.", "correct": false, "explanation": "Ziel ist eine Datei; Weiterleitung an Hosts erfolgt mit `@host` bzw. `@@host`." } ], "explanation": "Prioritäten aufsteigend: debug, info, notice, warning, err, crit, alert, emerg. `none` schließt aus, z. B. `*.info;mail.none`.", "references": ["man 5 rsyslog.conf"] }, { "id": "108.2-004", "objective": "108.2", "type": "single", "difficulty": 1, "question": "Mit welchem Befehl schreibt ein Shell-Skript eine eigene Meldung ins Systemprotokoll?", "options": [ { "id": "a", "text": "`logger \"Backup beendet\"`", "correct": true, "explanation": "`logger` übergibt die Meldung an syslog/journald; `-t` setzt einen Tag, `-p` die Priorität." }, { "id": "b", "text": "`wall \"Backup beendet\"`", "correct": false, "explanation": "`wall` sendet die Nachricht an alle Terminals." }, { "id": "c", "text": "`journalctl --write \"Backup beendet\"`", "correct": false, "explanation": "`journalctl` liest das Journal; eine Option `--write` gibt es nicht." }, { "id": "d", "text": "`dmesg -w \"Backup beendet\"`", "correct": false, "explanation": "`dmesg -w` wartet auf neue Kernel-Meldungen (follow)." }, { "id": "e", "text": "`syslog \"Backup beendet\"`", "correct": false, "explanation": "Einen Befehl `syslog` gibt es nicht." } ], "explanation": "Beispiel mit Facility und Priorität: `logger -p local0.notice -t backup \"fertig\"`.", "references": ["man 1 logger"] }, { "id": "108.2-005", "objective": "108.2", "type": "multi", "difficulty": 2, "question": "Wie erreicht man, dass das systemd-Journal Neustarts **überdauert** (persistent gespeichert wird)?", "options": [ { "id": "a", "text": "In `/etc/systemd/journald.conf` `Storage=persistent` setzen", "correct": true, "explanation": "journald schreibt dann nach `/var/log/journal`." }, { "id": "b", "text": "Das Verzeichnis `/var/log/journal` anlegen (bei `Storage=auto`)", "correct": true, "explanation": "Bei der Standardeinstellung `auto` wird persistent gespeichert, sobald das Verzeichnis existiert." }, { "id": "c", "text": "`Storage=volatile` setzen", "correct": false, "explanation": "`volatile` speichert nur im RAM unter `/run/log/journal`." }, { "id": "d", "text": "`journalctl --vacuum-size=1G` ausführen", "correct": false, "explanation": "Löscht alte Journal-Dateien, bis die Größe unterschritten ist." }, { "id": "e", "text": "`logrotate` für das Journal einrichten", "correct": false, "explanation": "journald rotiert selbst; logrotate ist für Textlogs." } ], "explanation": "Größe begrenzen: `SystemMaxUse=` in `journald.conf`. Journal einer anderen Installation lesen: `journalctl -D `.", "references": ["man 5 journald.conf"] }, { "id": "108.2-006", "objective": "108.2", "type": "single", "difficulty": 1, "question": "Wo legt man üblicherweise die Rotationsregeln für die Logdateien **eines einzelnen Dienstes** ab?", "options": [ { "id": "a", "text": "In einer Datei unter `/etc/logrotate.d/`", "correct": true, "explanation": "`/etc/logrotate.conf` bindet dieses Verzeichnis per `include` ein." }, { "id": "b", "text": "In einer Datei unter `/etc/rsyslog.d/`", "correct": false, "explanation": "Dort stehen Regeln, wohin rsyslog Meldungen schreibt, nicht wie rotiert wird." }, { "id": "c", "text": "In `/etc/systemd/journald.conf`", "correct": false, "explanation": "Gilt nur für das Journal, nicht für Textlogs eines Dienstes." }, { "id": "d", "text": "In `/var/log/rotate/`", "correct": false, "explanation": "Kein Standardpfad." }, { "id": "e", "text": "In `/etc/cron.daily/`", "correct": false, "explanation": "Dort liegt das Skript, das logrotate täglich startet, nicht die Regeln." } ], "explanation": "Typische Direktiven: `daily`/`weekly`, `rotate 7`, `compress`, `missingok`, `notifempty`, `postrotate … endscript`.", "references": ["man 8 logrotate"] }, { "id": "108.3-001", "objective": "108.3", "type": "single", "difficulty": 1, "question": "Welches der folgenden Programme ist ein **Mail Transfer Agent (MTA)**?", "options": [ { "id": "a", "text": "Postfix", "correct": true, "explanation": "Postfix nimmt Mails per SMTP an und leitet sie weiter bzw. stellt sie zu." }, { "id": "b", "text": "Dovecot", "correct": false, "explanation": "Dovecot ist ein IMAP/POP3-Server für den Abruf von Mails." }, { "id": "c", "text": "Thunderbird", "correct": false, "explanation": "Thunderbird ist ein Mail User Agent (MUA)." }, { "id": "d", "text": "mutt", "correct": false, "explanation": "mutt ist ein textbasierter MUA." }, { "id": "e", "text": "procmail", "correct": false, "explanation": "procmail ist ein Mail Delivery Agent (MDA), der Mails lokal sortiert und zustellt." } ], "explanation": "Weitere MTAs: Sendmail, Exim. Alle bieten aus Kompatibilitätsgründen einen `sendmail`-Befehl.", "references": ["LPI 102-500 Objective 108.3"] }, { "id": "108.3-002", "objective": "108.3", "type": "single", "difficulty": 1, "question": "In `/etc/aliases` wurde `root: admin@example.org` eingetragen. Welcher Befehl muss danach ausgeführt werden?", "options": [ { "id": "a", "text": "`newaliases`", "correct": true, "explanation": "Erzeugt die Alias-Datenbank (z. B. `/etc/aliases.db`) neu, die der MTA liest." }, { "id": "b", "text": "`mailq`", "correct": false, "explanation": "`mailq` zeigt die Warteschlange." }, { "id": "c", "text": "`sendmail -q`", "correct": false, "explanation": "Arbeitet die Warteschlange ab." }, { "id": "d", "text": "`postfix check`", "correct": false, "explanation": "Prüft die Postfix-Konfiguration, baut die Aliase aber nicht neu." }, { "id": "e", "text": "`systemctl restart aliases`", "correct": false, "explanation": "Einen Dienst `aliases` gibt es nicht." } ], "explanation": "`newaliases` entspricht `sendmail -bi`.", "references": ["man 5 aliases", "man 1 newaliases"] }, { "id": "108.3-003", "objective": "108.3", "type": "fill", "difficulty": 1, "question": "Welche Datei legt ein Benutzer in seinem Home-Verzeichnis an, um seine E-Mails an eine andere Adresse weiterzuleiten? (Dateiname)", "answers": [".forward", "~/.forward"], "explanation": "`~/.forward` enthält die Zieladresse(n). Systemweite Weiterleitungen gehören in `/etc/aliases`.", "references": ["man 5 forward"] }, { "id": "108.3-004", "objective": "108.3", "type": "single", "difficulty": 1, "question": "Welcher Befehl zeigt die Mail-Warteschlange des lokalen MTA an?", "options": [ { "id": "a", "text": "`mailq`", "correct": true, "explanation": "`mailq` entspricht `sendmail -bp` und funktioniert bei Sendmail, Postfix und Exim." }, { "id": "b", "text": "`newaliases`", "correct": false, "explanation": "Baut die Alias-Datenbank neu." }, { "id": "c", "text": "`mail`", "correct": false, "explanation": "`mail` ist ein einfacher MUA zum Lesen und Senden." }, { "id": "d", "text": "`postqueue -f`", "correct": false, "explanation": "`postqueue -f` versucht, die Postfix-Warteschlange sofort zuzustellen (flush)." }, { "id": "e", "text": "`smtpd`", "correct": false, "explanation": "`smtpd` ist ein Serverprozess von Postfix." } ], "explanation": "Lokale Mails von Diensten (z. B. cron) landen ohne Weiterleitung im Spool unter `/var/spool/mail/` bzw. `/var/mail/`.", "references": ["man 1 mailq"] }, { "id": "108.4-001", "objective": "108.4", "type": "single", "difficulty": 1, "question": "Auf welchem TCP-Port ist die Weboberfläche von CUPS standardmäßig erreichbar?", "options": [ { "id": "a", "text": "631", "correct": true, "explanation": "CUPS spricht IPP auf Port 631; dort liegt auch die Weboberfläche (http://localhost:631)." }, { "id": "b", "text": "515", "correct": false, "explanation": "515 ist der Port des alten LPD-Protokolls." }, { "id": "c", "text": "9100", "correct": false, "explanation": "9100 ist der Port für Raw-/JetDirect-Druck direkt auf Netzwerkdrucker." }, { "id": "d", "text": "8080", "correct": false, "explanation": "Üblicher alternativer HTTP-Port, nicht CUPS." }, { "id": "e", "text": "443", "correct": false, "explanation": "443 ist HTTPS." } ], "explanation": "CUPS-Konfiguration: `/etc/cups/cupsd.conf` (Dienst), `/etc/cups/printers.conf` (Drucker, nicht von Hand bei laufendem Dienst bearbeiten).", "references": ["man 8 cupsd"] }, { "id": "108.4-002", "objective": "108.4", "type": "single", "difficulty": 1, "question": "Welcher Befehl entfernt einen Druckauftrag aus der Warteschlange?", "options": [ { "id": "a", "text": "`lprm`", "correct": true, "explanation": "`lprm ` löscht den Auftrag (System-V-Variante: `cancel`)." }, { "id": "b", "text": "`lpq`", "correct": false, "explanation": "`lpq` zeigt die Warteschlange an." }, { "id": "c", "text": "`lpr`", "correct": false, "explanation": "`lpr` druckt eine Datei." }, { "id": "d", "text": "`lpstat`", "correct": false, "explanation": "`lpstat` zeigt Status von Druckern und Aufträgen." }, { "id": "e", "text": "`lpadmin`", "correct": false, "explanation": "`lpadmin` richtet Drucker ein und konfiguriert sie." } ], "explanation": "Berkeley-Befehle: `lpr`, `lpq`, `lprm`. System-V-Befehle: `lp`, `lpstat`, `cancel`. CUPS unterstützt beide.", "references": ["man 1 lprm"] }, { "id": "108.4-003", "objective": "108.4", "type": "multi", "difficulty": 2, "question": "Welche Aussagen zum Drucken unter Linux treffen zu?", "options": [ { "id": "a", "text": "`lpr -P buero bericht.pdf` druckt auf dem Drucker `buero`.", "correct": true, "explanation": "`-P` wählt den Drucker; ohne Angabe gilt der Standarddrucker." }, { "id": "b", "text": "`lpq` zeigt die Aufträge in der Warteschlange.", "correct": true, "explanation": "Mit `-P` für einen bestimmten Drucker, `-a` für alle." }, { "id": "c", "text": "`lpq` druckt eine Datei aus.", "correct": false, "explanation": "Drucken: `lpr` bzw. `lp`." }, { "id": "d", "text": "Die CUPS-Dienstkonfiguration liegt in `/etc/printcap.conf`.", "correct": false, "explanation": "Sie liegt in `/etc/cups/cupsd.conf`; `/etc/printcap` ist ein Überbleibsel von LPD." }, { "id": "e", "text": "`cupsenable buero` löscht den Drucker `buero`.", "correct": false, "explanation": "`cupsenable` aktiviert einen Drucker; löschen: `lpadmin -x buero`." } ], "explanation": "Annahme von Aufträgen steuern `cupsaccept`/`cupsreject`, das Drucken `cupsenable`/`cupsdisable`.", "references": ["man 1 lpr", "man 1 lpq"] } ] }