{ "$schema": "../schema/questions.schema.json", "format": "lpic-sim-questions", "meta": { "file": "questions_107_set2.json", "brief": "Zweiter Fragensatz zu Topic 107 Administrative Aufgaben (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 (30.10.2026)" }, "exam": "lpic1-102", "questions": [ { "id": "107.1-009", "objective": "107.1", "type": "single", "difficulty": 1, "question": "Welcher Eintrag in `/etc/group` ist korrekt aufgebaut?", "options": [ { "id": "a", "text": "`docker:x:998:anna,bob`", "correct": true, "explanation": "Name, Passwortplatzhalter, GID, Mitglieder durch Komma getrennt." }, { "id": "b", "text": "`docker:998:anna,bob`", "correct": false, "explanation": "Es fehlt das Passwortfeld; die Datei hat vier Felder." }, { "id": "c", "text": "`docker:x:998:anna bob`", "correct": false, "explanation": "Mitglieder werden durch Kommas getrennt, nicht durch Leerzeichen." }, { "id": "d", "text": "`998:docker:x:anna,bob`", "correct": false, "explanation": "Der Gruppenname steht im ersten Feld, die GID im dritten." }, { "id": "e", "text": "`docker:x:anna,bob:998`", "correct": false, "explanation": "Die GID steht vor der Mitgliederliste." } ], "explanation": "In der Mitgliederliste stehen nur Zusatzmitglieder; wer die Gruppe als primäre Gruppe hat, steht über die GID in `/etc/passwd`.", "references": ["man 5 group"] }, { "id": "107.1-010", "objective": "107.1", "type": "fill", "difficulty": 1, "question": "Welcher Befehl (mit Argument) zeigt UID, primäre GID und alle Gruppen des Benutzers `anna`?", "answers": ["id anna"], "explanation": "Ausgabe z. B. `uid=1001(anna) gid=1001(anna) groups=1001(anna),998(docker)`. `groups anna` zeigt nur die Gruppennamen.", "references": ["man 1 id"] }, { "id": "107.1-011", "objective": "107.1", "type": "single", "difficulty": 1, "question": "Wie legt man die Gruppe `projekt` mit der GID 1500 an?", "options": [ { "id": "a", "text": "`groupadd -g 1500 projekt`", "correct": true, "explanation": "`-g` legt die GID fest." }, { "id": "b", "text": "`groupadd projekt 1500`", "correct": false, "explanation": "`groupadd` erwartet nur den Gruppennamen als Argument." }, { "id": "c", "text": "`groupmod -g 1500 projekt`", "correct": false, "explanation": "`groupmod` ändert eine **bestehende** Gruppe." }, { "id": "d", "text": "`newgrp -g 1500 projekt`", "correct": false, "explanation": "`newgrp` wechselt die aktive Gruppe der Shell." }, { "id": "e", "text": "`useradd -g 1500 projekt`", "correct": false, "explanation": "Legt einen **Benutzer** `projekt` mit primärer Gruppe 1500 an." } ], "explanation": "Systemgruppen: `groupadd -r`. Umbenennen: `groupmod -n neu alt`.", "references": ["man 8 groupadd"] }, { "id": "107.1-012", "objective": "107.1", "type": "single", "difficulty": 2, "question": "Das Konto `backup` soll für Dienste und Dateibesitz erhalten bleiben, aber **keine interaktive Anmeldung** mehr erlauben. Was ist geeignet?", "options": [ { "id": "a", "text": "`usermod -s /usr/sbin/nologin backup`", "correct": true, "explanation": "Bei der Anmeldung startet `nologin`, gibt eine Meldung aus und beendet sich." }, { "id": "b", "text": "`userdel backup`", "correct": false, "explanation": "Löscht das Konto; Dateien gehören danach einer „verwaisten“ UID." }, { "id": "c", "text": "`passwd -d backup`", "correct": false, "explanation": "Löscht das Passwort – je nach Konfiguration wird die Anmeldung damit sogar einfacher." }, { "id": "d", "text": "`usermod -G nologin backup`", "correct": false, "explanation": "Setzt die Zusatzgruppe `nologin`, die es normalerweise nicht gibt." }, { "id": "e", "text": "`chage -M 0 backup`", "correct": false, "explanation": "Erzwingt nur eine sofortige Passwortänderung." } ], "explanation": "Systemkonten erhalten typischerweise `/usr/sbin/nologin` oder `/bin/false` als Shell.", "references": ["man 8 nologin", "man 8 usermod"] }, { "id": "107.1-013", "objective": "107.1", "type": "multi", "difficulty": 1, "question": "Mit welchen Befehlen ändert man die Login-Shell eines Benutzers?", "options": [ { "id": "a", "text": "`chsh -s /bin/zsh anna`", "correct": true, "explanation": "`chsh` ändert die Shell; normale Benutzer dürfen ihre eigene ändern (auf Shells aus `/etc/shells`)." }, { "id": "b", "text": "`usermod -s /bin/zsh anna`", "correct": true, "explanation": "`usermod -s` setzt das siebte Feld in `/etc/passwd` (nur root)." }, { "id": "c", "text": "`chfn -s /bin/zsh anna`", "correct": false, "explanation": "`chfn` ändert die GECOS-Angaben (Name, Telefon)." }, { "id": "d", "text": "`usermod -c /bin/zsh anna`", "correct": false, "explanation": "`-c` setzt den Kommentar (GECOS)." }, { "id": "e", "text": "`chage -s /bin/zsh anna`", "correct": false, "explanation": "`chage` verwaltet die Passwort-Alterung." } ], "explanation": "`/etc/shells` listet die gültigen Login-Shells.", "references": ["man 1 chsh"] }, { "id": "107.1-014", "objective": "107.1", "type": "single", "difficulty": 2, "question": "In welcher Datei stehen u. a. die UID-Bereiche für normale Benutzer (`UID_MIN`, `UID_MAX`) und Standardwerte der Passwort-Alterung (`PASS_MAX_DAYS`)?", "options": [ { "id": "a", "text": "`/etc/login.defs`", "correct": true, "explanation": "Sie gilt für `useradd`, `groupadd`, `passwd` und weitere Shadow-Werkzeuge." }, { "id": "b", "text": "`/etc/default/useradd`", "correct": false, "explanation": "Enthält Vorgaben wie `SHELL`, `HOME`, `SKEL`, aber keine UID-Bereiche." }, { "id": "c", "text": "`/etc/security/limits.conf`", "correct": false, "explanation": "Legt Ressourcenlimits pro Benutzer fest." }, { "id": "d", "text": "`/etc/shells`", "correct": false, "explanation": "Listet erlaubte Login-Shells." }, { "id": "e", "text": "`/etc/pam.d/passwd`", "correct": false, "explanation": "PAM-Konfiguration für das Programm `passwd`." } ], "explanation": "Die Alterungswerte aus `login.defs` gelten nur für neu angelegte Konten; bestehende ändert man mit `chage`.", "references": ["man 5 login.defs"] }, { "id": "107.1-015", "objective": "107.1", "type": "fill", "difficulty": 1, "question": "Welcher Befehl (mit Option und Benutzername) zeigt die Passwort-Alterungsdaten des Benutzers `anna` an?", "answers": ["chage -l anna", "chage --list anna"], "explanation": "Zeigt letzte Änderung, Ablauf von Passwort und Konto sowie Mindest-/Höchstdauer und Warnzeit.", "references": ["man 1 chage"] }, { "id": "107.1-016", "objective": "107.1", "type": "single", "difficulty": 1, "question": "Welche Datei enthält Gruppenpasswörter und die Gruppenadministratoren?", "options": [ { "id": "a", "text": "`/etc/gshadow`", "correct": true, "explanation": "Felder: Name, Passwort, Administratoren, Mitglieder; nur für root lesbar." }, { "id": "b", "text": "`/etc/group`", "correct": false, "explanation": "Enthält GID und Mitglieder, im Passwortfeld nur `x`." }, { "id": "c", "text": "`/etc/shadow`", "correct": false, "explanation": "Enthält die Passwörter der **Benutzer**." }, { "id": "d", "text": "`/etc/sudoers`", "correct": false, "explanation": "Regelt sudo-Berechtigungen." }, { "id": "e", "text": "`/etc/groups`", "correct": false, "explanation": "Diese Datei gibt es nicht." } ], "explanation": "Gruppenadministratoren verwalten Mitglieder mit `gpasswd -a/-d`. Gruppenpasswörter werden kaum noch genutzt.", "references": ["man 5 gshadow", "man 1 gpasswd"] }, { "id": "107.1-017", "objective": "107.1", "type": "multi", "difficulty": 2, "question": "Was geschieht bei `userdel anna` **ohne** weitere Optionen?", "options": [ { "id": "a", "text": "Die Einträge von `anna` in `/etc/passwd` und `/etc/shadow` werden entfernt.", "correct": true, "explanation": "Das Konto selbst wird gelöscht." }, { "id": "b", "text": "Das Home-Verzeichnis `/home/anna` bleibt erhalten.", "correct": true, "explanation": "Erst `-r` entfernt Home-Verzeichnis und Mail-Spool." }, { "id": "c", "text": "Alle Dateien von `anna` im gesamten System werden gelöscht.", "correct": false, "explanation": "Dateien außerhalb des Homes bleiben immer erhalten – mit `find / -nouser` findet man sie." }, { "id": "d", "text": "Laufende Prozesse von `anna` werden automatisch beendet.", "correct": false, "explanation": "`userdel` verweigert das Löschen, solange der Benutzer angemeldet ist (`-f` erzwingt)." }, { "id": "e", "text": "Die gleichnamige private Gruppe bleibt in jedem Fall bestehen.", "correct": false, "explanation": "Mit `USERGROUPS_ENAB yes` wird sie mitgelöscht, sofern sie nicht anderweitig genutzt wird." } ], "explanation": "Vor dem Löschen eines Kontos Dateien sichern oder neu zuordnen; verwaiste Dateien zeigen `find / -nouser -o -nogroup`.", "references": ["man 8 userdel"] }, { "id": "107.2-007", "objective": "107.2", "type": "single", "difficulty": 1, "question": "Welche crontab-Kurzschreibweise führt einen Befehl einmal nach **jedem Systemstart** aus?", "options": [ { "id": "a", "text": "`@reboot`", "correct": true, "explanation": "Läuft einmal, wenn der cron-Daemon startet." }, { "id": "b", "text": "`@daily`", "correct": false, "explanation": "Entspricht `0 0 * * *` (täglich um Mitternacht)." }, { "id": "c", "text": "`@boot`", "correct": false, "explanation": "Diese Kurzschreibweise gibt es nicht." }, { "id": "d", "text": "`@startup`", "correct": false, "explanation": "Diese Kurzschreibweise gibt es nicht." }, { "id": "e", "text": "`0 0 * * 0`", "correct": false, "explanation": "Sonntags um Mitternacht (`@weekly`)." } ], "explanation": "Kurzschreibweisen: `@reboot`, `@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`.", "references": ["man 5 crontab"] }, { "id": "107.2-008", "objective": "107.2", "type": "fill", "difficulty": 2, "question": "Geben Sie die fünf crontab-Zeitfelder ein, mit denen ein Job **alle 15 Minuten** läuft.", "answers": ["*/15 * * * *", "0,15,30,45 * * * *", "0-59/15 * * * *"], "explanation": "`*/15` im Minutenfeld bedeutet „jede 15. Minute“ (0, 15, 30, 45).", "references": ["man 5 crontab"] }, { "id": "107.2-009", "objective": "107.2", "type": "single", "difficulty": 1, "question": "Wie löscht man den anstehenden at-Auftrag mit der Nummer 7?", "options": [ { "id": "a", "text": "`atrm 7`", "correct": true, "explanation": "`atrm` entfernt at-Aufträge anhand der Nummer aus `atq`." }, { "id": "b", "text": "`atq 7`", "correct": false, "explanation": "`atq` listet nur die Warteschlange." }, { "id": "c", "text": "`crontab -r 7`", "correct": false, "explanation": "`crontab -r` löscht die **gesamte** crontab des Benutzers – Vorsicht!" }, { "id": "d", "text": "`kill 7`", "correct": false, "explanation": "Sendet ein Signal an den Prozess mit PID 7." }, { "id": "e", "text": "`at -l 7`", "correct": false, "explanation": "`at -l` entspricht `atq` und listet Aufträge." } ], "explanation": "`at -c 7` zeigt den Inhalt des Auftrags. `at -d 7` ist gleichbedeutend mit `atrm 7`.", "references": ["man 1 at"] }, { "id": "107.2-010", "objective": "107.2", "type": "single", "difficulty": 2, "question": "Ein systemd-Timer soll eine Ausführung **nachholen**, die verpasst wurde, weil der Rechner ausgeschaltet war. Welche Einstellung im `[Timer]`-Abschnitt sorgt dafür?", "options": [ { "id": "a", "text": "`Persistent=true`", "correct": true, "explanation": "Der Zeitpunkt der letzten Ausführung wird gespeichert; Verpasstes läuft nach dem Start." }, { "id": "b", "text": "`OnBootSec=0`", "correct": false, "explanation": "Startet nach jedem Boot, unabhängig vom Kalender." }, { "id": "c", "text": "`AccuracySec=1s`", "correct": false, "explanation": "Legt nur die Genauigkeit des Auslösezeitpunkts fest." }, { "id": "d", "text": "`WakeSystem=true`", "correct": false, "explanation": "Weckt das System aus dem Ruhezustand; ein ausgeschaltetes System hilft das nicht." }, { "id": "e", "text": "`RemainAfterElapse=true`", "correct": false, "explanation": "Lässt den Timer nach Ablauf geladen; mit Nachholen hat das nichts zu tun." } ], "explanation": "Klassisch erfüllt `anacron` diese Aufgabe für tägliche/wöchentliche cron-Jobs.", "references": ["man 5 systemd.timer"] }, { "id": "107.2-011", "objective": "107.2", "type": "single", "difficulty": 2, "question": "Welcher Befehl führt `/usr/local/bin/sync.sh` **einmalig in 30 Minuten** als transiente systemd-Unit aus?", "options": [ { "id": "a", "text": "`systemd-run --on-active=30m /usr/local/bin/sync.sh`", "correct": true, "explanation": "`systemd-run` erzeugt Timer und Service vorübergehend; `--on-active` zählt ab jetzt." }, { "id": "b", "text": "`systemd-run --on-calendar=30m /usr/local/bin/sync.sh`", "correct": false, "explanation": "`--on-calendar` erwartet einen Kalenderausdruck wie `*-*-* 02:00`, keine Zeitspanne." }, { "id": "c", "text": "`systemctl start --in 30m /usr/local/bin/sync.sh`", "correct": false, "explanation": "`systemctl start` kennt keine Verzögerung und startet nur Units." }, { "id": "d", "text": "`at --systemd 30m /usr/local/bin/sync.sh`", "correct": false, "explanation": "`at` hat keine solche Option; richtig wäre `echo /usr/local/bin/sync.sh | at now + 30 minutes`." }, { "id": "e", "text": "`timedatectl run 30m /usr/local/bin/sync.sh`", "correct": false, "explanation": "`timedatectl` verwaltet Uhrzeit und Zeitzone." } ], "explanation": "Transiente Timer erscheinen in `systemctl list-timers` und verschwinden nach Ausführung.", "references": ["man 1 systemd-run"] }, { "id": "107.2-012", "objective": "107.2", "type": "multi", "difficulty": 2, "question": "Welche Werte sind gültige `OnCalendar=`-Angaben in einer systemd-Timer-Unit?", "options": [ { "id": "a", "text": "`daily`", "correct": true, "explanation": "Kurzform für `*-*-* 00:00:00`." }, { "id": "b", "text": "`Mon *-*-* 02:30:00`", "correct": true, "explanation": "Wochentag, Datum (Jahr-Monat-Tag), Uhrzeit." }, { "id": "c", "text": "`*/15 * * * *`", "correct": false, "explanation": "Das ist crontab-Syntax; systemd schreibt z. B. `*:0/15`." }, { "id": "d", "text": "`every 5 minutes`", "correct": false, "explanation": "Freitext versteht systemd nicht." }, { "id": "e", "text": "`30 2 * * 1`", "correct": false, "explanation": "crontab-Syntax, nicht systemd." } ], "explanation": "Prüfen und Vorschau: `systemd-analyze calendar \"Mon *-*-* 02:30:00\"`.", "references": ["man 7 systemd.time"] }, { "id": "107.2-013", "objective": "107.2", "type": "fill", "difficulty": 2, "question": "Mit welchem `crontab`-Aufruf zeigt root die crontab des Benutzers `bob` an?", "answers": ["crontab -l -u bob", "crontab -u bob -l"], "explanation": "`-u` wählt den Benutzer; mit `-e` bearbeitet root fremde crontabs.", "references": ["man 1 crontab"] }, { "id": "107.3-005", "objective": "107.3", "type": "single", "difficulty": 1, "question": "Welcher Befehl listet alle auf dem System verfügbaren (erzeugten) Locales auf?", "options": [ { "id": "a", "text": "`locale -a`", "correct": true, "explanation": "`-a` (all) listet z. B. `C.UTF-8`, `de_DE.utf8`, `en_US.utf8`." }, { "id": "b", "text": "`locale`", "correct": false, "explanation": "Zeigt nur die aktuell wirksamen Einstellungen." }, { "id": "c", "text": "`localectl list-keymaps`", "correct": false, "explanation": "Listet Tastaturbelegungen." }, { "id": "d", "text": "`iconv -l`", "correct": false, "explanation": "Listet Zeichenkodierungen, keine Locales." }, { "id": "e", "text": "`ls /etc/locale`", "correct": false, "explanation": "Kein Standardort für Locales." } ], "explanation": "Fehlende Locales erzeugt man unter Debian mit `locale-gen` bzw. `dpkg-reconfigure locales`. Systemweite Vorgabe: `localectl set-locale LANG=de_DE.UTF-8`.", "references": ["man 1 locale"] }, { "id": "107.3-006", "objective": "107.3", "type": "fill", "difficulty": 1, "question": "Welcher Befehl (nur der Name) zeigt die aktuell wirksamen Locale-Einstellungen (`LANG`, `LC_*`) an?", "answers": ["locale"], "explanation": "Werte in Anführungszeichen sind abgeleitet (aus `LANG` bzw. `LC_ALL`), nicht ausdrücklich gesetzt.", "references": ["man 1 locale"] }, { "id": "107.3-007", "objective": "107.3", "type": "single", "difficulty": 2, "question": "Was ist `/etc/localtime` auf den meisten aktuellen Linux-Systemen?", "options": [ { "id": "a", "text": "Ein symbolischer Link auf eine Zeitzonendatei unter `/usr/share/zoneinfo/`", "correct": true, "explanation": "z. B. `/etc/localtime -> /usr/share/zoneinfo/Europe/Berlin`." }, { "id": "b", "text": "Eine Textdatei mit dem Namen der Zeitzone", "correct": false, "explanation": "Das ist `/etc/timezone` (Debian)." }, { "id": "c", "text": "Die Konfiguration der Hardware-Uhr (UTC oder Ortszeit)", "correct": false, "explanation": "Das steht in `/etc/adjtime`." }, { "id": "d", "text": "Eine Protokolldatei der Zeitsynchronisation", "correct": false, "explanation": "Keine Protokolldatei." }, { "id": "e", "text": "Ein Kernelparameter unter `/proc`", "correct": false, "explanation": "`/etc` liegt auf der Festplatte, nicht im procfs." } ], "explanation": "Die Zeitzonendaten (tzdata) liegen binär unter `/usr/share/zoneinfo/`.", "references": ["man 5 localtime"] }, { "id": "107.3-008", "objective": "107.3", "type": "single", "difficulty": 1, "question": "Wie zeigt man **einmalig** die aktuelle Uhrzeit in New York an, ohne die Zeitzone des Systems zu ändern?", "options": [ { "id": "a", "text": "`TZ=America/New_York date`", "correct": true, "explanation": "`TZ` gilt hier nur für diesen einen Aufruf von `date`." }, { "id": "b", "text": "`timedatectl set-timezone America/New_York`", "correct": false, "explanation": "Ändert die Zeitzone des Systems dauerhaft." }, { "id": "c", "text": "`LC_TIME=America/New_York date`", "correct": false, "explanation": "`LC_TIME` steuert nur das Format, nicht die Zeitzone." }, { "id": "d", "text": "`date -u`", "correct": false, "explanation": "Zeigt UTC an." }, { "id": "e", "text": "`hwclock --localtime`", "correct": false, "explanation": "Betrifft die Interpretation der Hardware-Uhr." } ], "explanation": "Gültige Namen liefert `timedatectl list-timezones` oder `tzselect`.", "references": ["man 1 date", "man 3 tzset"] }, { "id": "107.3-009", "objective": "107.3", "type": "single", "difficulty": 1, "question": "Welche Locale-Kategorie bestimmt das **Format von Datum und Uhrzeit**?", "options": [ { "id": "a", "text": "`LC_TIME`", "correct": true, "explanation": "z. B. `30.10.2026` bei `de_DE` statt `10/30/2026` bei `en_US`." }, { "id": "b", "text": "`LC_NUMERIC`", "correct": false, "explanation": "Dezimal- und Tausendertrennzeichen." }, { "id": "c", "text": "`LC_COLLATE`", "correct": false, "explanation": "Sortierreihenfolge." }, { "id": "d", "text": "`LC_MESSAGES`", "correct": false, "explanation": "Sprache der Programmmeldungen." }, { "id": "e", "text": "`LC_CTYPE`", "correct": false, "explanation": "Zeichenklassen und Zeichensatz." } ], "explanation": "Weitere: `LC_MONETARY` (Währung), `LC_PAPER`, `LC_MEASUREMENT`.", "references": ["man 7 locale"] }, { "id": "107.3-010", "objective": "107.3", "type": "multi", "difficulty": 2, "question": "Welche Werkzeuge helfen, die **Zeitzone** auszuwählen bzw. einzustellen?", "options": [ { "id": "a", "text": "`tzselect`", "correct": true, "explanation": "Interaktive Auswahl; gibt den passenden `TZ`-Wert aus." }, { "id": "b", "text": "`dpkg-reconfigure tzdata`", "correct": true, "explanation": "Debian: setzt `/etc/timezone` und `/etc/localtime`." }, { "id": "c", "text": "`locale-gen`", "correct": false, "explanation": "Erzeugt Locales." }, { "id": "d", "text": "`iconv`", "correct": false, "explanation": "Konvertiert Zeichenkodierungen." }, { "id": "e", "text": "`localectl set-locale`", "correct": false, "explanation": "Setzt die systemweite Locale, nicht die Zeitzone." } ], "explanation": "Mit systemd: `timedatectl set-timezone `.", "references": ["man 8 tzselect"] } ] }