rein damit
This commit is contained in:
1 parent
7f6b8ebe07
commit
07dbc01c92
38 files changed
+5632
-5
No files matched your search
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"meta": {
|
||||
"file": "exam.json",
|
||||
"brief": "Prüfungsdefinition LPIC-1 102-500: Eckdaten, Topics, Objectives mit Gewichtung",
|
||||
"author": "Björn Runden <br@runden.de>",
|
||||
"owner": "Björn Runden <br@runden.de>",
|
||||
"assist": "KI-unterstützt (Claude Opus 5.5), geprüft von Björn Runden <br@runden.de>",
|
||||
"version": "0.1.0 (29.10.2026)"
|
||||
},
|
||||
"exam": {
|
||||
"id": "lpic1-102",
|
||||
"level": "LPIC-1",
|
||||
"title": "LPIC-1 Prüfung 102",
|
||||
"code": "102-500",
|
||||
"lang": "de",
|
||||
"order": 102,
|
||||
"objectives_version": "5.0",
|
||||
"objectives_source": "https://www.lpi.org/de/exam-101-102-objectives/",
|
||||
"objectives_retrieved": "2026-10-29",
|
||||
"questions": 60,
|
||||
"duration_min": 90,
|
||||
"pass_percent": 65
|
||||
},
|
||||
"topics": [
|
||||
{
|
||||
"id": "105",
|
||||
"title": "Shells und Shell-Skripte",
|
||||
"objectives": [
|
||||
{ "id": "105.1", "title": "Die Shell-Umgebung anpassen und verwenden", "weight": 4 },
|
||||
{ "id": "105.2", "title": "Einfache Skripte anpassen oder schreiben", "weight": 4 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "106",
|
||||
"title": "Benutzerschnittstellen und Desktops",
|
||||
"objectives": [
|
||||
{ "id": "106.1", "title": "X11 installieren und konfigurieren", "weight": 2 },
|
||||
{ "id": "106.2", "title": "Grafische Desktops", "weight": 1 },
|
||||
{ "id": "106.3", "title": "Barrierefreiheit", "weight": 1 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "107",
|
||||
"title": "Administrative Aufgaben",
|
||||
"objectives": [
|
||||
{ "id": "107.1", "title": "Benutzer- und Gruppenkonten und dazugehörige Systemdateien verwalten", "weight": 5 },
|
||||
{ "id": "107.2", "title": "Systemadministrationsaufgaben durch Einplanen von Jobs automatisieren", "weight": 4 },
|
||||
{ "id": "107.3", "title": "Lokalisierung und Internationalisierung", "weight": 3 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "108",
|
||||
"title": "Grundlegende Systemdienste",
|
||||
"objectives": [
|
||||
{ "id": "108.1", "title": "Die Systemzeit verwalten", "weight": 3 },
|
||||
{ "id": "108.2", "title": "Systemprotokollierung", "weight": 4 },
|
||||
{ "id": "108.3", "title": "Grundlagen von Mail Transfer Agents (MTA)", "weight": 3 },
|
||||
{ "id": "108.4", "title": "Drucker und Druckvorgänge verwalten", "weight": 2 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "109",
|
||||
"title": "Netzwerkgrundlagen",
|
||||
"objectives": [
|
||||
{ "id": "109.1", "title": "Grundlagen von Internetprotokollen", "weight": 4 },
|
||||
{ "id": "109.2", "title": "Persistente Netzwerkkonfiguration", "weight": 4 },
|
||||
{ "id": "109.3", "title": "Grundlegende Netzwerkfehlerbehebung", "weight": 4 },
|
||||
{ "id": "109.4", "title": "Clientseitiges DNS konfigurieren", "weight": 2 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "110",
|
||||
"title": "Sicherheit",
|
||||
"objectives": [
|
||||
{ "id": "110.1", "title": "Administrationsaufgaben für Sicherheit durchführen", "weight": 3 },
|
||||
{ "id": "110.2", "title": "Einen Rechner absichern", "weight": 3 },
|
||||
{ "id": "110.3", "title": "Daten durch Verschlüsselung schützen", "weight": 4 }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
{
|
||||
"$schema": "../schema/questions.schema.json",
|
||||
"format": "lpic-sim-questions",
|
||||
"meta": {
|
||||
"file": "questions_105.json",
|
||||
"brief": "Fragen zu Topic 105 Shells und Shell-Skripte (LPIC-1 102-500, Objectives 5.0)",
|
||||
"author": "Björn Runden <br@runden.de>",
|
||||
"owner": "Björn Runden <br@runden.de>",
|
||||
"assist": "KI-unterstützt (Claude Opus 5.5), geprüft von Björn Runden <br@runden.de>",
|
||||
"version": "0.1.0 (29.10.2026)"
|
||||
},
|
||||
"exam": "lpic1-102",
|
||||
"questions": [
|
||||
{
|
||||
"id": "105.1-001",
|
||||
"objective": "105.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Datei liest eine interaktive **Login**-Bash als erste ein?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`/etc/profile`", "correct": true, "explanation": "Login-Shells lesen zuerst die systemweite `/etc/profile`, danach die erste vorhandene aus `~/.bash_profile`, `~/.bash_login`, `~/.profile`." },
|
||||
{ "id": "b", "text": "`~/.bashrc`", "correct": false, "explanation": "`~/.bashrc` lesen interaktive Nicht-Login-Shells; Login-Shells nur, wenn `~/.bash_profile` sie einbindet." },
|
||||
{ "id": "c", "text": "`~/.bash_profile`", "correct": false, "explanation": "Wird gelesen, aber erst nach `/etc/profile`." },
|
||||
{ "id": "d", "text": "`/etc/bash.bashrc`", "correct": false, "explanation": "Systemweite Datei für interaktive Nicht-Login-Shells (Debian); wird oft über `/etc/profile` eingebunden." },
|
||||
{ "id": "e", "text": "`~/.bash_logout`", "correct": false, "explanation": "Wird beim Beenden einer Login-Shell ausgeführt." }
|
||||
],
|
||||
"explanation": "Login-Shell: `/etc/profile` → `~/.bash_profile` | `~/.bash_login` | `~/.profile`. Nicht-Login-Shell: `/etc/bash.bashrc` (distributionsabhängig) → `~/.bashrc`.",
|
||||
"references": ["man 1 bash (Abschnitt INVOCATION)"]
|
||||
},
|
||||
{
|
||||
"id": "105.1-002",
|
||||
"objective": "105.1",
|
||||
"type": "multi",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Schreibweisen definieren in der Bash korrekt eine Funktion `gruss`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`gruss() { echo Hallo; }`", "correct": true, "explanation": "POSIX-Schreibweise; vor der schließenden Klammer ist `;` oder ein Zeilenumbruch nötig." },
|
||||
{ "id": "b", "text": "`function gruss { echo Hallo; }`", "correct": true, "explanation": "Bash-spezifische Schreibweise mit dem Schlüsselwort `function`." },
|
||||
{ "id": "c", "text": "`def gruss(): echo Hallo`", "correct": false, "explanation": "Das ist Python-ähnliche Syntax." },
|
||||
{ "id": "d", "text": "`gruss = { echo Hallo }`", "correct": false, "explanation": "Leerzeichen um `=` und diese Klammerung sind keine gültige Funktionssyntax." },
|
||||
{ "id": "e", "text": "`alias gruss() echo Hallo`", "correct": false, "explanation": "Aliase werden mit `alias name='befehl'` gesetzt und haben keine Klammern." }
|
||||
],
|
||||
"explanation": "Funktionen sehen Argumente als `$1`, `$2`, …; `declare -f` listet definierte Funktionen. Dauerhaft z. B. in `~/.bashrc`.",
|
||||
"references": ["man 1 bash (Abschnitt FUNCTIONS)"]
|
||||
},
|
||||
{
|
||||
"id": "105.1-003",
|
||||
"objective": "105.1",
|
||||
"type": "fill",
|
||||
"difficulty": 2,
|
||||
"question": "Welches Bash-Builtin führt die Befehle einer Datei in der **aktuellen** Shell aus, sodass dort gesetzte Variablen danach erhalten bleiben? (Name des Builtins)",
|
||||
"answers": ["source", "."],
|
||||
"explanation": "`source ~/.bashrc` bzw. `. ~/.bashrc`. Ein Aufruf als `./datei` oder `bash datei` läuft dagegen in einer Subshell; deren Variablen gehen verloren.",
|
||||
"references": ["help source"]
|
||||
},
|
||||
{
|
||||
"id": "105.1-004",
|
||||
"objective": "105.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Der Alias `ll='ls -l'` soll für einen Benutzer dauerhaft in jeder interaktiven Bash verfügbar sein. Wo trägt man ihn ein?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`~/.bashrc`", "correct": true, "explanation": "`~/.bashrc` wird von jeder interaktiven Nicht-Login-Bash gelesen und meist auch aus `~/.bash_profile` eingebunden." },
|
||||
{ "id": "b", "text": "`/etc/aliases`", "correct": false, "explanation": "`/etc/aliases` enthält E-Mail-Aliase für den MTA, keine Shell-Aliase." },
|
||||
{ "id": "c", "text": "`~/.bash_logout`", "correct": false, "explanation": "Wird nur beim Abmelden ausgeführt." },
|
||||
{ "id": "d", "text": "`/etc/shells`", "correct": false, "explanation": "`/etc/shells` listet die zulässigen Login-Shells." },
|
||||
{ "id": "e", "text": "`~/.bash_history`", "correct": false, "explanation": "Enthält nur die gespeicherte Befehls-History." }
|
||||
],
|
||||
"explanation": "Ein Alias in der Shell gilt nur bis zum Ende der Sitzung; dauerhaft wird er durch einen Eintrag in einer Startdatei.",
|
||||
"references": ["help alias"]
|
||||
},
|
||||
{
|
||||
"id": "105.1-005",
|
||||
"objective": "105.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Das Verzeichnis `/opt/tools/bin` soll **zusätzlich** zum bisherigen Suchpfad verwendet werden. Welcher Befehl ist korrekt?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`export PATH=$PATH:/opt/tools/bin`", "correct": true, "explanation": "Der alte Inhalt bleibt erhalten, das neue Verzeichnis wird mit `:` angehängt." },
|
||||
{ "id": "b", "text": "`export PATH=/opt/tools/bin`", "correct": false, "explanation": "Ersetzt den Suchpfad; Standardbefehle wie `ls` werden nicht mehr gefunden." },
|
||||
{ "id": "c", "text": "`export PATH=$PATH;/opt/tools/bin`", "correct": false, "explanation": "`;` trennt Befehle; die Shell würde `/opt/tools/bin` als Befehl ausführen." },
|
||||
{ "id": "d", "text": "`export $PATH=$PATH:/opt/tools/bin`", "correct": false, "explanation": "Links vom `=` steht der Variablenname ohne `$`." },
|
||||
{ "id": "e", "text": "`set PATH /opt/tools/bin`", "correct": false, "explanation": "Das ist csh-Syntax; in der Bash setzt `set` Positionsparameter." }
|
||||
],
|
||||
"explanation": "Verzeichnisse im `PATH` werden von links nach rechts durchsucht; `$PATH` voranzustellen oder anzuhängen bestimmt die Priorität.",
|
||||
"references": ["man 1 bash (Abschnitt Shell Variables)"]
|
||||
},
|
||||
{
|
||||
"id": "105.1-006",
|
||||
"objective": "105.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welches Verzeichnis enthält die Vorlagen (z. B. `.bashrc`, `.profile`), die beim Anlegen eines Benutzers mit `useradd -m` in dessen Home-Verzeichnis kopiert werden?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`/etc/skel`", "correct": true, "explanation": "Der Inhalt von `/etc/skel` wird in neue Home-Verzeichnisse kopiert." },
|
||||
{ "id": "b", "text": "`/etc/default/useradd`", "correct": false, "explanation": "Datei mit Standardwerten für `useradd` (u. a. `SKEL=`), kein Vorlagenverzeichnis." },
|
||||
{ "id": "c", "text": "`/etc/profile.d`", "correct": false, "explanation": "Enthält Skripte, die `/etc/profile` beim Login einbindet." },
|
||||
{ "id": "d", "text": "`/etc/login.defs`", "correct": false, "explanation": "Datei mit Vorgaben wie UID-Bereichen und Passwort-Alterung." },
|
||||
{ "id": "e", "text": "`/home/template`", "correct": false, "explanation": "Kein Standardpfad." }
|
||||
],
|
||||
"explanation": "Änderungen an `/etc/skel` wirken nur für künftig angelegte Benutzer.",
|
||||
"references": ["man 8 useradd"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-001",
|
||||
"objective": "105.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Variable enthält in einem Shell-Skript die **Anzahl** der übergebenen Argumente?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`$#`", "correct": true, "explanation": "`$#` ist die Anzahl der Positionsparameter." },
|
||||
{ "id": "b", "text": "`$0`", "correct": false, "explanation": "`$0` ist der Name des Skripts." },
|
||||
{ "id": "c", "text": "`$@`", "correct": false, "explanation": "`$@` sind alle Argumente als einzelne Wörter." },
|
||||
{ "id": "d", "text": "`$?`", "correct": false, "explanation": "`$?` ist der Exit-Status des letzten Befehls." },
|
||||
{ "id": "e", "text": "`$$`", "correct": false, "explanation": "`$$` ist die PID der Shell." }
|
||||
],
|
||||
"explanation": "Weitere: `$1`…`$9` Argumente, `${10}` ab dem zehnten, `$*` alle als ein Wort (in Anführungszeichen), `shift` verschiebt die Argumente.",
|
||||
"references": ["man 1 bash (Abschnitt Special Parameters)"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-002",
|
||||
"objective": "105.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welcher Bedingung prüft ein Skript, ob `/etc/app.conf` existiert **und eine reguläre Datei** ist?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`[ -f /etc/app.conf ]`", "correct": true, "explanation": "`-f` ist wahr für existierende reguläre Dateien." },
|
||||
{ "id": "b", "text": "`[ -d /etc/app.conf ]`", "correct": false, "explanation": "`-d` prüft auf ein Verzeichnis." },
|
||||
{ "id": "c", "text": "`[ -e /etc/app.conf ]`", "correct": false, "explanation": "`-e` prüft nur auf Existenz, gleich welcher Typ (auch Verzeichnis)." },
|
||||
{ "id": "d", "text": "`[ -x /etc/app.conf ]`", "correct": false, "explanation": "`-x` prüft auf Ausführbarkeit." },
|
||||
{ "id": "e", "text": "`[ -L /etc/app.conf ]`", "correct": false, "explanation": "`-L` prüft auf einen symbolischen Link." }
|
||||
],
|
||||
"explanation": "`[ … ]` ist der Befehl `test`; Leerzeichen innerhalb der Klammern sind Pflicht. Weitere Tests: `-s` nicht leer, `-r`/`-w` lesbar/schreibbar, `-z`/`-n` leerer/nicht leerer String.",
|
||||
"references": ["man 1 test"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-003",
|
||||
"objective": "105.2",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Welche spezielle Variable enthält den Exit-Status (Rückgabewert) des zuletzt ausgeführten Befehls?",
|
||||
"answers": ["$?"],
|
||||
"explanation": "0 bedeutet Erfolg, alles andere einen Fehler. Darauf bauen `&&`, `||` und `if` auf.",
|
||||
"references": ["man 1 bash (Abschnitt Special Parameters)"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-004",
|
||||
"objective": "105.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Schleife ist in der Bash syntaktisch korrekt?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`for i in 1 2 3; do echo $i; done`", "correct": true, "explanation": "Aufbau: `for <var> in <liste>; do … done`." },
|
||||
{ "id": "b", "text": "`for i in 1 2 3; then echo $i; fi`", "correct": false, "explanation": "`then`/`fi` gehören zu `if`." },
|
||||
{ "id": "c", "text": "`for (i in 1 2 3) { echo $i }`", "correct": false, "explanation": "C/JavaScript-ähnliche Syntax; die Bash kennt das nicht." },
|
||||
{ "id": "d", "text": "`foreach i (1 2 3) echo $i end`", "correct": false, "explanation": "`foreach … end` ist csh-Syntax." },
|
||||
{ "id": "e", "text": "`for i = 1 to 3; do echo $i; done`", "correct": false, "explanation": "BASIC-ähnlich; nicht gültig. Zahlenreihen: `$(seq 1 3)` oder `{1..3}`." }
|
||||
],
|
||||
"explanation": "Weitere Schleifen: `while bedingung; do … done`, `until …`. C-Stil in der Bash: `for ((i=1; i<=3; i++)); do … done`.",
|
||||
"references": ["man 1 bash (Abschnitt Compound Commands)"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-005",
|
||||
"objective": "105.2",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zum Ausführen von Shell-Skripten treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Die erste Zeile `#!/bin/bash` legt den Interpreter fest, wenn das Skript direkt ausgeführt wird.", "correct": true, "explanation": "Der Kernel wertet die Shebang-Zeile aus und startet den angegebenen Interpreter." },
|
||||
{ "id": "b", "text": "Für den Aufruf `./skript.sh` braucht die Datei das Ausführungsrecht.", "correct": true, "explanation": "Ohne `x`-Recht meldet die Shell „Permission denied“." },
|
||||
{ "id": "c", "text": "Auch `bash skript.sh` funktioniert nur mit Ausführungsrecht.", "correct": false, "explanation": "Hier ist `bash` das ausgeführte Programm; es braucht nur Leserecht auf das Skript." },
|
||||
{ "id": "d", "text": "Die Shebang-Zeile darf an beliebiger Stelle im Skript stehen.", "correct": false, "explanation": "Sie wirkt nur als allererste Zeile und muss mit `#!` beginnen." },
|
||||
{ "id": "e", "text": "Das aktuelle Verzeichnis ist standardmäßig im `PATH`; `skript.sh` ohne `./` genügt.", "correct": false, "explanation": "Aus Sicherheitsgründen steht `.` normalerweise nicht im `PATH`." }
|
||||
],
|
||||
"explanation": "SUID/SGID-Bits werden bei Skripten unter Linux ignoriert. Mit `exec` ersetzt ein Skript sich selbst durch ein anderes Programm.",
|
||||
"references": ["man 2 execve"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-006",
|
||||
"objective": "105.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl liest in einem Skript eine Zeile von der Tastatur in die Variable `NAME` ein?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`read NAME`", "correct": true, "explanation": "`read` liest eine Zeile von stdin; `-p \"Text\"` zeigt vorher eine Eingabeaufforderung an." },
|
||||
{ "id": "b", "text": "`input NAME`", "correct": false, "explanation": "Einen Befehl `input` gibt es in der Bash nicht." },
|
||||
{ "id": "c", "text": "`echo $NAME`", "correct": false, "explanation": "Gibt den Inhalt der Variable aus, liest nichts ein." },
|
||||
{ "id": "d", "text": "`NAME < /dev/stdin`", "correct": false, "explanation": "Die Shell versucht, einen Befehl namens `NAME` auszuführen; eine Variable wird nicht gesetzt." },
|
||||
{ "id": "e", "text": "`get NAME`", "correct": false, "explanation": "Einen Befehl `get` gibt es in der Bash nicht." }
|
||||
],
|
||||
"explanation": "Mehrere Variablen: `read VORNAME NACHNAME` verteilt die Wörter nach `IFS`. Ohne Variablenname landet die Eingabe in `REPLY`.",
|
||||
"references": ["help read"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
{
|
||||
"$schema": "../schema/questions.schema.json",
|
||||
"format": "lpic-sim-questions",
|
||||
"meta": {
|
||||
"file": "questions_106.json",
|
||||
"brief": "Fragen zu Topic 106 Benutzerschnittstellen und Desktops (LPIC-1 102-500, Objectives 5.0)",
|
||||
"author": "Björn Runden <br@runden.de>",
|
||||
"owner": "Björn Runden <br@runden.de>",
|
||||
"assist": "KI-unterstützt (Claude Opus 5.5), geprüft von Björn Runden <br@runden.de>",
|
||||
"version": "0.1.0 (29.10.2026)"
|
||||
},
|
||||
"exam": "lpic1-102",
|
||||
"questions": [
|
||||
{
|
||||
"id": "106.1-001",
|
||||
"objective": "106.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Umgebungsvariable legt fest, auf welchem X-Server ein X11-Programm seine Fenster darstellt?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`DISPLAY`", "correct": true, "explanation": "Format `host:display.screen`, lokal meist `:0`." },
|
||||
{ "id": "b", "text": "`XAUTHORITY`", "correct": false, "explanation": "Verweist auf die Datei mit den Zugriffs-Cookies (Standard `~/.Xauthority`)." },
|
||||
{ "id": "c", "text": "`TERM`", "correct": false, "explanation": "Beschreibt den Typ des Text-Terminals." },
|
||||
{ "id": "d", "text": "`XDG_SESSION_TYPE`", "correct": false, "explanation": "Zeigt nur an, ob die Sitzung `x11` oder `wayland` ist." },
|
||||
{ "id": "e", "text": "`WAYLAND_DISPLAY`", "correct": false, "explanation": "Gibt den Socket des Wayland-Compositors an, nicht den X-Server." }
|
||||
],
|
||||
"explanation": "Zugriff auf einen X-Server steuern `xhost` (host-basiert) und `xauth` (Cookies). X-Weiterleitung über SSH: `ssh -X`.",
|
||||
"references": ["man 7 X"]
|
||||
},
|
||||
{
|
||||
"id": "106.1-002",
|
||||
"objective": "106.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wo liegt die Hauptkonfiguration des Xorg-Servers bzw. wo legt man ergänzende Konfigurationsschnipsel ab?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`/etc/X11/xorg.conf` bzw. `/etc/X11/xorg.conf.d/`", "correct": true, "explanation": "Moderne Xorg-Server erkennen vieles automatisch; Anpassungen kommen als Dateien in `xorg.conf.d`." },
|
||||
{ "id": "b", "text": "`/etc/xorg/server.conf`", "correct": false, "explanation": "Diesen Pfad gibt es nicht." },
|
||||
{ "id": "c", "text": "`~/.xinitrc`", "correct": false, "explanation": "`~/.xinitrc` legt fest, was `startx` startet, nicht die Server-Hardwarekonfiguration." },
|
||||
{ "id": "d", "text": "`/etc/X11/Xresources`", "correct": false, "explanation": "X-Ressourcen konfigurieren das Aussehen von Clients, nicht den Server." },
|
||||
{ "id": "e", "text": "`/var/log/Xorg.0.log`", "correct": false, "explanation": "Das ist das Protokoll des Servers, hilfreich bei Fehlern, aber keine Konfiguration." }
|
||||
],
|
||||
"explanation": "Abschnitte in `xorg.conf`: `Section \"Device\"`, `\"Monitor\"`, `\"Screen\"`, `\"InputDevice\"`, `\"ServerLayout\"` … Fehlersuche über `/var/log/Xorg.0.log`.",
|
||||
"references": ["man 5 xorg.conf"]
|
||||
},
|
||||
{
|
||||
"id": "106.1-003",
|
||||
"objective": "106.1",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zu Wayland treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Unter Wayland übernimmt der Compositor zugleich die Aufgaben des Display-Servers.", "correct": true, "explanation": "Es gibt keinen getrennten Server wie Xorg; der Compositor (z. B. Mutter, KWin) zeichnet und verteilt Eingaben." },
|
||||
{ "id": "b", "text": "XWayland ermöglicht es, X11-Programme in einer Wayland-Sitzung auszuführen.", "correct": true, "explanation": "XWayland ist ein X-Server, der als Wayland-Client läuft." },
|
||||
{ "id": "c", "text": "Wayland wird über `/etc/X11/xorg.conf` konfiguriert.", "correct": false, "explanation": "Die Konfiguration erfolgt im jeweiligen Compositor bzw. der Desktopumgebung." },
|
||||
{ "id": "d", "text": "Wayland ist wie X11 netzwerktransparent über `DISPLAY=host:0`.", "correct": false, "explanation": "Das Wayland-Protokoll selbst ist nicht netzwerktransparent; Fernzugriff läuft über Zusatzlösungen." },
|
||||
{ "id": "e", "text": "Wayland setzt den Display-Manager `xdm` voraus.", "correct": false, "explanation": "Wayland-Sitzungen werden z. B. von GDM oder SDDM gestartet; `xdm` kann das nicht." }
|
||||
],
|
||||
"explanation": "Ob eine Sitzung X11 oder Wayland nutzt, zeigt `echo $XDG_SESSION_TYPE`.",
|
||||
"references": ["https://wayland.freedesktop.org/"]
|
||||
},
|
||||
{
|
||||
"id": "106.2-001",
|
||||
"objective": "106.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welches Fernzugriffsverfahren für grafische Desktops basiert auf dem Remote-Framebuffer-Protokoll (RFB)?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "VNC", "correct": true, "explanation": "VNC (Virtual Network Computing) überträgt Bildschirminhalte per RFB, Standardport 5900 + Display-Nummer." },
|
||||
{ "id": "b", "text": "RDP", "correct": false, "explanation": "RDP ist das Remote Desktop Protocol von Microsoft (Port 3389), unter Linux z. B. mit xrdp." },
|
||||
{ "id": "c", "text": "SPICE", "correct": false, "explanation": "SPICE ist ein eigenes Protokoll für die Anzeige virtueller Maschinen (QEMU/KVM)." },
|
||||
{ "id": "d", "text": "XDMCP", "correct": false, "explanation": "XDMCP vermittelt Anmeldungen an einen entfernten X-Display-Manager, unverschlüsselt." },
|
||||
{ "id": "e", "text": "SMTP", "correct": false, "explanation": "SMTP überträgt E-Mails." }
|
||||
],
|
||||
"explanation": "106.2 verlangt Grundwissen zu Desktopumgebungen und Protokollen für den entfernten Desktopzugriff (X11, XDMCP, VNC, SPICE, RDP).",
|
||||
"references": ["RFC 6143"]
|
||||
},
|
||||
{
|
||||
"id": "106.2-002",
|
||||
"objective": "106.2",
|
||||
"type": "multi",
|
||||
"difficulty": 1,
|
||||
"question": "Welche der folgenden sind **Desktopumgebungen**?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "GNOME", "correct": true, "explanation": "Verbreitete Desktopumgebung (GTK-basiert)." },
|
||||
{ "id": "b", "text": "KDE Plasma", "correct": true, "explanation": "Desktopumgebung auf Qt-Basis." },
|
||||
{ "id": "c", "text": "Xfce", "correct": true, "explanation": "Ressourcenschonende Desktopumgebung (GTK-basiert)." },
|
||||
{ "id": "d", "text": "Xorg", "correct": false, "explanation": "Xorg ist der X-Display-Server, auf dem Desktopumgebungen laufen können." },
|
||||
{ "id": "e", "text": "systemd", "correct": false, "explanation": "systemd ist Init-System und Dienstverwaltung." }
|
||||
],
|
||||
"explanation": "Weitere Desktops: Cinnamon, MATE, LXDE/LXQt. Eine Desktopumgebung bündelt Fenstermanager, Panel, Dateimanager und Einstellungen.",
|
||||
"references": ["LPI 102-500 Objective 106.2"]
|
||||
},
|
||||
{
|
||||
"id": "106.3-001",
|
||||
"objective": "106.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welches Programm ist ein verbreiteter **Bildschirmleser** (Screenreader) für grafische Linux-Desktops wie GNOME?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Orca", "correct": true, "explanation": "Orca gibt Bildschirminhalte per Sprachausgabe oder Braillezeile aus." },
|
||||
{ "id": "b", "text": "Onboard", "correct": false, "explanation": "Onboard ist eine Bildschirmtastatur." },
|
||||
{ "id": "c", "text": "xmag", "correct": false, "explanation": "`xmag` vergrößert einen Bildschirmausschnitt." },
|
||||
{ "id": "d", "text": "Sticky Keys", "correct": false, "explanation": "Eine Tastatureinstellung, kein Bildschirmleser." },
|
||||
{ "id": "e", "text": "`xrandr`", "correct": false, "explanation": "`xrandr` stellt Auflösung und Anordnung von Monitoren ein." }
|
||||
],
|
||||
"explanation": "Hilfstechnologien: Bildschirmleser, Braillezeilen, Bildschirmlupe, Bildschirmtastatur, Hochkontrast-Themes, große Schriften, Sprachsynthese.",
|
||||
"references": ["https://help.gnome.org/users/orca/stable/"]
|
||||
},
|
||||
{
|
||||
"id": "106.3-002",
|
||||
"objective": "106.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Was bewirken **einrastende Tasten** (Sticky Keys)?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Umschalt-, Strg- oder Alt-Taste bleiben nach dem Loslassen aktiv, sodass Tastenkombinationen nacheinander gedrückt werden können.", "correct": true, "explanation": "Hilft Menschen, die nicht mehrere Tasten gleichzeitig drücken können." },
|
||||
{ "id": "b", "text": "Eine Taste muss eine Weile gehalten werden, bevor der Anschlag zählt.", "correct": false, "explanation": "Das sind die Langsamen Tasten (Slow Keys)." },
|
||||
{ "id": "c", "text": "Schnell wiederholte Anschläge derselben Taste werden ignoriert.", "correct": false, "explanation": "Das sind die Springenden Tasten (Bounce Keys)." },
|
||||
{ "id": "d", "text": "Der Mauszeiger wird mit dem Ziffernblock gesteuert.", "correct": false, "explanation": "Das sind die Maustasten (Mouse Keys)." },
|
||||
{ "id": "e", "text": "Der Bildschirm wird in hohem Kontrast dargestellt.", "correct": false, "explanation": "Das ist ein Hochkontrast-Theme." }
|
||||
],
|
||||
"explanation": "AccessX-Funktionen der Tastatur: Sticky, Slow, Bounce, Toggle Keys sowie Mouse Keys.",
|
||||
"references": ["LPI 102-500 Objective 106.3"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,285 @@
|
||||
{
|
||||
"$schema": "../schema/questions.schema.json",
|
||||
"format": "lpic-sim-questions",
|
||||
"meta": {
|
||||
"file": "questions_107.json",
|
||||
"brief": "Fragen zu Topic 107 Administrative Aufgaben (LPIC-1 102-500, Objectives 5.0)",
|
||||
"author": "Björn Runden <br@runden.de>",
|
||||
"owner": "Björn Runden <br@runden.de>",
|
||||
"assist": "KI-unterstützt (Claude Opus 5.5), geprüft von Björn Runden <br@runden.de>",
|
||||
"version": "0.1.0 (29.10.2026)"
|
||||
},
|
||||
"exam": "lpic1-102",
|
||||
"questions": [
|
||||
{
|
||||
"id": "107.1-001",
|
||||
"objective": "107.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "In welcher Datei stehen auf aktuellen Linux-Systemen die Passwort-Hashes der Benutzerkonten?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`/etc/shadow`", "correct": true, "explanation": "Nur für root lesbar; enthält Hash und Daten zur Passwort-Alterung." },
|
||||
{ "id": "b", "text": "`/etc/passwd`", "correct": false, "explanation": "Für alle lesbar; im Passwortfeld steht nur `x` als Verweis auf `/etc/shadow`." },
|
||||
{ "id": "c", "text": "`/etc/group`", "correct": false, "explanation": "Enthält Gruppen und ihre Mitglieder." },
|
||||
{ "id": "d", "text": "`/etc/gshadow`", "correct": false, "explanation": "Enthält Gruppenpasswörter und Gruppenadministratoren." },
|
||||
{ "id": "e", "text": "`/etc/login.defs`", "correct": false, "explanation": "Enthält Vorgaben, z. B. UID-Bereiche und Standardwerte der Passwort-Alterung." }
|
||||
],
|
||||
"explanation": "Felder von `/etc/shadow`: Name, Hash, letzte Änderung, min, max, Warnung, Inaktivität, Ablaufdatum, reserviert.",
|
||||
"references": ["man 5 shadow"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-002",
|
||||
"objective": "107.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Was steht im **siebten** (letzten) Feld eines Eintrags in `/etc/passwd`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Die Login-Shell", "correct": true, "explanation": "z. B. `/bin/bash` oder `/usr/sbin/nologin` für Konten ohne Anmeldung." },
|
||||
{ "id": "b", "text": "Das Home-Verzeichnis", "correct": false, "explanation": "Das ist das sechste Feld." },
|
||||
{ "id": "c", "text": "Das GECOS-Feld (Kommentar, voller Name)", "correct": false, "explanation": "Das ist das fünfte Feld." },
|
||||
{ "id": "d", "text": "Die primäre Gruppen-ID", "correct": false, "explanation": "Das ist das vierte Feld." },
|
||||
{ "id": "e", "text": "Die Benutzer-ID", "correct": false, "explanation": "Das ist das dritte Feld." }
|
||||
],
|
||||
"explanation": "Aufbau: `name:x:UID:GID:GECOS:home:shell`, z. B. `anna:x:1001:1001:Anna:/home/anna:/bin/bash`.",
|
||||
"references": ["man 5 passwd"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-003",
|
||||
"objective": "107.1",
|
||||
"type": "fill",
|
||||
"difficulty": 2,
|
||||
"question": "Der Benutzer `anna` soll zusätzlich in die Gruppe `docker` aufgenommen werden, **ohne** seine übrigen Zusatzgruppen zu verlieren. Geben Sie den Befehl ein.",
|
||||
"answers": ["usermod -aG docker anna", "usermod -a -G docker anna", "usermod -G docker -a anna", "usermod --append --groups docker anna", "gpasswd -a anna docker"],
|
||||
"explanation": "`-G` allein ersetzt die Liste der Zusatzgruppen; erst `-a` (append) hängt an. Die Änderung wirkt erst nach erneuter Anmeldung (oder mit `newgrp`).",
|
||||
"references": ["man 8 usermod", "man 1 gpasswd"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-004",
|
||||
"objective": "107.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welchem Befehl legt man den Benutzer `bob` an und erzeugt dabei gleich sein Home-Verzeichnis (mit Inhalt aus `/etc/skel`)?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`useradd -m bob`", "correct": true, "explanation": "`-m` (`--create-home`) legt das Home-Verzeichnis an und kopiert `/etc/skel`." },
|
||||
{ "id": "b", "text": "`useradd -d /home/bob bob`", "correct": false, "explanation": "`-d` legt nur den Pfad fest, erzeugt das Verzeichnis aber nicht." },
|
||||
{ "id": "c", "text": "`useradd -s /bin/bash bob`", "correct": false, "explanation": "`-s` setzt nur die Login-Shell." },
|
||||
{ "id": "d", "text": "`useradd -g users bob`", "correct": false, "explanation": "`-g` setzt die primäre Gruppe." },
|
||||
{ "id": "e", "text": "`useradd -k /etc/skel bob`", "correct": false, "explanation": "`-k` wählt das Vorlagenverzeichnis und wirkt nur zusammen mit `-m`." }
|
||||
],
|
||||
"explanation": "Ob `useradd` ohne `-m` ein Home anlegt, hängt von `CREATE_HOME` in `/etc/login.defs` ab. Debian bietet zusätzlich das interaktive `adduser`.",
|
||||
"references": ["man 8 useradd"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-005",
|
||||
"objective": "107.1",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Mit welchen Befehlen sperrt man das Passwort des Kontos `carl`, sodass keine Anmeldung per Passwort mehr möglich ist?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`usermod -L carl`", "correct": true, "explanation": "`-L` setzt ein `!` vor den Hash in `/etc/shadow`." },
|
||||
{ "id": "b", "text": "`passwd -l carl`", "correct": true, "explanation": "`passwd -l` sperrt ebenfalls durch Voranstellen von `!`; `-u` entsperrt." },
|
||||
{ "id": "c", "text": "`passwd -d carl`", "correct": false, "explanation": "`-d` löscht das Passwort – je nach Konfiguration ist dann sogar eine Anmeldung ohne Passwort möglich." },
|
||||
{ "id": "d", "text": "`chage -l carl`", "correct": false, "explanation": "`chage -l` zeigt nur die Alterungsinformationen an." },
|
||||
{ "id": "e", "text": "`userdel -l carl`", "correct": false, "explanation": "`userdel` löscht Konten; eine Option `-l` zum Sperren gibt es nicht." }
|
||||
],
|
||||
"explanation": "Eine Passwortsperre verhindert keine Anmeldung per SSH-Schlüssel. Komplett sperren: zusätzlich Ablaufdatum setzen (`usermod -e 1` bzw. `chage -E 0`) oder Shell auf `nologin`.",
|
||||
"references": ["man 8 usermod", "man 1 passwd"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-006",
|
||||
"objective": "107.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Der Benutzer `dora` soll sein Passwort spätestens alle 90 Tage ändern müssen. Welcher Befehl setzt das?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`chage -M 90 dora`", "correct": true, "explanation": "`-M` setzt die maximale Gültigkeit des Passworts in Tagen." },
|
||||
{ "id": "b", "text": "`chage -m 90 dora`", "correct": false, "explanation": "`-m` ist die Mindestdauer zwischen zwei Änderungen." },
|
||||
{ "id": "c", "text": "`chage -W 90 dora`", "correct": false, "explanation": "`-W` legt fest, wie viele Tage vorher gewarnt wird." },
|
||||
{ "id": "d", "text": "`chage -E 90 dora`", "correct": false, "explanation": "`-E` setzt das Ablaufdatum des Kontos (Datum oder Tage seit 1.1.1970)." },
|
||||
{ "id": "e", "text": "`chage -I 90 dora`", "correct": false, "explanation": "`-I` legt die Inaktivitätsfrist nach Ablauf des Passworts fest." }
|
||||
],
|
||||
"explanation": "`chage -l dora` zeigt die aktuellen Werte. Dieselben Felder lassen sich teils auch mit `passwd -n/-x/-w/-i` setzen.",
|
||||
"references": ["man 1 chage"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-007",
|
||||
"objective": "107.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Benutzer kommen teils aus `/etc/passwd`, teils aus LDAP. Welcher Befehl zeigt den Kontoeintrag von `anna` **unabhängig von der Quelle** an?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`getent passwd anna`", "correct": true, "explanation": "`getent` fragt die Datenbanken über NSS ab, also in der Reihenfolge aus `/etc/nsswitch.conf`." },
|
||||
{ "id": "b", "text": "`grep anna /etc/passwd`", "correct": false, "explanation": "Findet nur lokale Einträge." },
|
||||
{ "id": "c", "text": "`who anna`", "correct": false, "explanation": "`who` zeigt angemeldete Benutzer; ein Argument wird als Datei interpretiert." },
|
||||
{ "id": "d", "text": "`last anna`", "correct": false, "explanation": "`last` zeigt die Anmeldehistorie aus `wtmp`." },
|
||||
{ "id": "e", "text": "`cat /etc/nsswitch.conf`", "correct": false, "explanation": "Zeigt nur die Konfiguration der Quellen, keine Konten." }
|
||||
],
|
||||
"explanation": "Analog: `getent group`, `getent hosts`, `getent shadow` (als root).",
|
||||
"references": ["man 1 getent", "man 5 nsswitch.conf"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-008",
|
||||
"objective": "107.1",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zur Benutzer- und Gruppenverwaltung treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`userdel -r anna` löscht auch das Home-Verzeichnis und das Mail-Spool von `anna`.", "correct": true, "explanation": "Ohne `-r` bleiben Home-Verzeichnis und Mail-Spool erhalten." },
|
||||
{ "id": "b", "text": "Systemkonten haben üblicherweise UIDs unterhalb von `UID_MIN` aus `/etc/login.defs`.", "correct": true, "explanation": "Typisch: Systemkonten unter 1000, normale Benutzer ab 1000; `useradd -r` legt Systemkonten an." },
|
||||
{ "id": "c", "text": "`groupdel` löscht eine Gruppe auch dann, wenn sie die primäre Gruppe eines Benutzers ist.", "correct": false, "explanation": "`groupdel` verweigert das; zuerst muss die primäre Gruppe des Benutzers geändert werden." },
|
||||
{ "id": "d", "text": "Die UID 0 kann nur ein Konto mit dem Namen `root` haben.", "correct": false, "explanation": "Entscheidend ist die UID: Jedes Konto mit UID 0 hat Root-Rechte – ein Sicherheitsrisiko." },
|
||||
{ "id": "e", "text": "`passwd` ohne Argument ändert immer das Passwort von root.", "correct": false, "explanation": "Ohne Argument ändert `passwd` das Passwort des aufrufenden Benutzers." }
|
||||
],
|
||||
"explanation": "Gruppen: `groupadd`, `groupmod -n neu alt` (umbenennen), `groupdel`. Mitgliedschaften prüfen: `id anna`, `groups anna`.",
|
||||
"references": ["man 8 userdel", "man 5 login.defs"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-001",
|
||||
"objective": "107.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wann läuft der Benutzer-crontab-Eintrag `30 2 * * 1 /usr/local/bin/backup.sh`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Jeden Montag um 02:30 Uhr", "correct": true, "explanation": "Minute 30, Stunde 2, jeder Tag, jeder Monat, Wochentag 1 = Montag." },
|
||||
{ "id": "b", "text": "Jeden Tag um 02:30 Uhr", "correct": false, "explanation": "Das wäre `30 2 * * *`." },
|
||||
{ "id": "c", "text": "Am 1. jedes Monats um 02:30 Uhr", "correct": false, "explanation": "Das wäre `30 2 1 * *` (drittes Feld = Tag des Monats)." },
|
||||
{ "id": "d", "text": "Im Januar täglich um 02:30 Uhr", "correct": false, "explanation": "Das wäre `30 2 * 1 *` (viertes Feld = Monat)." },
|
||||
{ "id": "e", "text": "Montags alle 30 Minuten ab 02:00 Uhr", "correct": false, "explanation": "Das wäre z. B. `*/30 2-23 * * 1`." }
|
||||
],
|
||||
"explanation": "Felder: Minute · Stunde · Tag des Monats · Monat · Wochentag (0 und 7 = Sonntag) · Befehl.",
|
||||
"references": ["man 5 crontab"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-002",
|
||||
"objective": "107.2",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welchem Befehl (mit Option) bearbeitet ein Benutzer seine eigene crontab?",
|
||||
"answers": ["crontab -e"],
|
||||
"explanation": "`crontab -e` öffnet den Editor und prüft beim Speichern die Syntax; `-l` listet, `-r` löscht. Die Dateien liegen unter `/var/spool/cron/`.",
|
||||
"references": ["man 1 crontab"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-003",
|
||||
"objective": "107.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Worin unterscheidet sich ein Eintrag in `/etc/crontab` (bzw. `/etc/cron.d/*`) von einem Eintrag in einer Benutzer-crontab?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Vor dem Befehl steht zusätzlich ein Feld mit dem Benutzernamen, unter dem der Befehl läuft.", "correct": true, "explanation": "Aufbau systemweit: fünf Zeitfelder, Benutzer, Befehl – z. B. `17 * * * * root run-parts /etc/cron.hourly`." },
|
||||
{ "id": "b", "text": "Es gibt kein Feld für den Wochentag.", "correct": false, "explanation": "Die fünf Zeitfelder sind identisch." },
|
||||
{ "id": "c", "text": "Die Zeitangaben stehen in Sekunden statt in Minuten.", "correct": false, "explanation": "cron arbeitet mit Minuten als kleinster Einheit." },
|
||||
{ "id": "d", "text": "Die Datei wird mit `crontab -e` bearbeitet.", "correct": false, "explanation": "`/etc/crontab` wird direkt mit einem Editor bearbeitet." },
|
||||
{ "id": "e", "text": "Befehle laufen dort immer als root, ein Benutzerfeld gibt es nicht.", "correct": false, "explanation": "Gerade das Benutzerfeld ist der Unterschied." }
|
||||
],
|
||||
"explanation": "Daneben gibt es `/etc/cron.hourly`, `.daily`, `.weekly`, `.monthly` für Skripte ohne Zeitangabe.",
|
||||
"references": ["man 5 crontab", "man 8 cron"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-004",
|
||||
"objective": "107.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Ein Befehl soll **einmalig** heute um 23:00 Uhr ausgeführt werden. Welches Werkzeug ist dafür gedacht?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`at 23:00`", "correct": true, "explanation": "`at` liest die Befehle von stdin und führt sie einmalig zur angegebenen Zeit aus." },
|
||||
{ "id": "b", "text": "`batch 23:00`", "correct": false, "explanation": "`batch` führt Aufträge aus, sobald die Systemlast es zulässt; eine Uhrzeit nimmt es nicht an." },
|
||||
{ "id": "c", "text": "`crontab -t 23:00`", "correct": false, "explanation": "`crontab` hat keine Option `-t`; cron ist für wiederkehrende Aufträge." },
|
||||
{ "id": "d", "text": "`sleep 23:00`", "correct": false, "explanation": "`sleep` erwartet eine Dauer, keine Uhrzeit." },
|
||||
{ "id": "e", "text": "`cron 23:00`", "correct": false, "explanation": "`cron` ist der Daemon und nimmt keine Aufträge auf der Befehlszeile an." }
|
||||
],
|
||||
"explanation": "`atq` listet anstehende at-Aufträge, `atrm` löscht sie. Zugriff steuern `/etc/at.allow` und `/etc/at.deny`. Mit systemd: `systemd-run --on-calendar=…`.",
|
||||
"references": ["man 1 at"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-005",
|
||||
"objective": "107.2",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Dateien steuern, welche Benutzer `crontab` verwenden dürfen?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`/etc/cron.allow`", "correct": true, "explanation": "Existiert sie, dürfen nur die dort genannten Benutzer crontab nutzen." },
|
||||
{ "id": "b", "text": "`/etc/cron.deny`", "correct": true, "explanation": "Existiert keine `cron.allow`, sind die hier genannten Benutzer ausgeschlossen." },
|
||||
{ "id": "c", "text": "`/etc/at.deny`", "correct": false, "explanation": "Steuert nur den Zugriff auf `at`." },
|
||||
{ "id": "d", "text": "`/etc/crontab`", "correct": false, "explanation": "Die systemweite crontab enthält Aufträge, keine Zugriffsregeln." },
|
||||
{ "id": "e", "text": "`/etc/security/access.conf`", "correct": false, "explanation": "Regelt per PAM, wer sich wo anmelden darf." }
|
||||
],
|
||||
"explanation": "Fehlen beide Dateien, hängt das Verhalten von der Distribution ab (oft dürfen alle, teils nur root).",
|
||||
"references": ["man 1 crontab"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-006",
|
||||
"objective": "107.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl listet alle systemd-Timer mit ihrem nächsten und letzten Ausführungszeitpunkt auf?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`systemctl list-timers`", "correct": true, "explanation": "Mit `--all` auch inaktive Timer." },
|
||||
{ "id": "b", "text": "`systemctl status cron`", "correct": false, "explanation": "Zeigt den Zustand des cron-Dienstes, nicht die systemd-Timer." },
|
||||
{ "id": "c", "text": "`atq`", "correct": false, "explanation": "Listet at-Aufträge." },
|
||||
{ "id": "d", "text": "`crontab -l`", "correct": false, "explanation": "Listet die crontab des aktuellen Benutzers." },
|
||||
{ "id": "e", "text": "`journalctl --timers`", "correct": false, "explanation": "Eine solche Option gibt es nicht." }
|
||||
],
|
||||
"explanation": "Ein Timer (`name.timer`) startet die gleichnamige `name.service`-Unit; Zeitangaben z. B. `OnCalendar=daily` oder `OnBootSec=10min`.",
|
||||
"references": ["man 5 systemd.timer"]
|
||||
},
|
||||
{
|
||||
"id": "107.3-001",
|
||||
"objective": "107.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welchem Befehl stellt man auf einem systemd-System die Zeitzone **dauerhaft** auf Europe/Berlin?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`timedatectl set-timezone Europe/Berlin`", "correct": true, "explanation": "Setzt den Link `/etc/localtime` auf `/usr/share/zoneinfo/Europe/Berlin`." },
|
||||
{ "id": "b", "text": "`localectl set-timezone Europe/Berlin`", "correct": false, "explanation": "`localectl` verwaltet Locale und Tastaturbelegung, keine Zeitzone." },
|
||||
{ "id": "c", "text": "`export TZ=Europe/Berlin`", "correct": false, "explanation": "Gilt nur für die aktuelle Shell und ihre Kindprozesse." },
|
||||
{ "id": "d", "text": "`hwclock --timezone Europe/Berlin`", "correct": false, "explanation": "`hwclock` liest und stellt die Hardware-Uhr, eine Zeitzone setzt es nicht." },
|
||||
{ "id": "e", "text": "`date --zone Europe/Berlin`", "correct": false, "explanation": "`date` hat keine solche Option; man kann nur per `TZ=… date` einmalig anzeigen." }
|
||||
],
|
||||
"explanation": "Ohne systemd: `/etc/localtime` von Hand verlinken bzw. unter Debian `/etc/timezone` und `dpkg-reconfigure tzdata`. Interaktiv hilft `tzselect`.",
|
||||
"references": ["man 1 timedatectl", "man 8 tzselect"]
|
||||
},
|
||||
{
|
||||
"id": "107.3-002",
|
||||
"objective": "107.3",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Variable überschreibt **alle** anderen Locale-Einstellungen (`LANG` und alle `LC_*`)?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`LC_ALL`", "correct": true, "explanation": "`LC_ALL` hat Vorrang vor allen einzelnen `LC_*` und vor `LANG`." },
|
||||
{ "id": "b", "text": "`LANG`", "correct": false, "explanation": "`LANG` ist der Standardwert mit der niedrigsten Priorität." },
|
||||
{ "id": "c", "text": "`LC_MESSAGES`", "correct": false, "explanation": "Gilt nur für die Sprache von Programmmeldungen." },
|
||||
{ "id": "d", "text": "`LC_CTYPE`", "correct": false, "explanation": "Gilt nur für Zeichenklassifizierung und Zeichensatz." },
|
||||
{ "id": "e", "text": "`TZ`", "correct": false, "explanation": "`TZ` legt die Zeitzone fest, keine Locale." }
|
||||
],
|
||||
"explanation": "`locale` zeigt die wirksamen Werte, `locale -a` alle verfügbaren Locales. `LANG=C` bzw. `C.UTF-8` erzwingt neutrale Ausgaben, z. B. in Skripten.",
|
||||
"references": ["man 7 locale"]
|
||||
},
|
||||
{
|
||||
"id": "107.3-003",
|
||||
"objective": "107.3",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Welches Programm konvertiert Textdateien zwischen Zeichenkodierungen, z. B. von ISO-8859-1 nach UTF-8? (nur der Befehlsname)",
|
||||
"answers": ["iconv"],
|
||||
"explanation": "Beispiel: `iconv -f ISO-8859-1 -t UTF-8 alt.txt > neu.txt`; `iconv -l` listet die bekannten Kodierungen.",
|
||||
"references": ["man 1 iconv"]
|
||||
},
|
||||
{
|
||||
"id": "107.3-004",
|
||||
"objective": "107.3",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zu Zeichenkodierungen treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "UTF-8 kodiert Unicode-Zeichen mit variabler Länge (1 bis 4 Byte).", "correct": true, "explanation": "Häufige Zeichen sind kurz, seltene länger." },
|
||||
{ "id": "b", "text": "ASCII-Zeichen haben in UTF-8 dieselben Byte-Werte wie in ASCII.", "correct": true, "explanation": "UTF-8 ist abwärtskompatibel zu 7-Bit-ASCII." },
|
||||
{ "id": "c", "text": "ISO-8859-1 enthält das Euro-Zeichen.", "correct": false, "explanation": "Das Euro-Zeichen kam erst mit ISO-8859-15 (Latin-9)." },
|
||||
{ "id": "d", "text": "UTF-8 benötigt für jedes Zeichen genau 2 Byte.", "correct": false, "explanation": "Feste 2 Byte entsprächen UCS-2; UTF-8 ist variabel." },
|
||||
{ "id": "e", "text": "`LANG=C` aktiviert UTF-8 für alle Programme.", "correct": false, "explanation": "Die C/POSIX-Locale verwendet ASCII; für UTF-8 z. B. `C.UTF-8` oder `de_DE.UTF-8`." }
|
||||
],
|
||||
"explanation": "Im Objective genannt: UTF-8, ISO-8859, ASCII, Unicode sowie `locale`, `iconv`, `/etc/timezone`, `/etc/localtime`, `/usr/share/zoneinfo/`.",
|
||||
"references": ["man 7 utf-8", "man 7 charsets"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,269 @@
|
||||
{
|
||||
"$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 <br@runden.de>",
|
||||
"owner": "Björn Runden <br@runden.de>",
|
||||
"assist": "KI-unterstützt (Claude Opus 5.5), geprüft von Björn Runden <br@runden.de>",
|
||||
"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 <verzeichnis>`.",
|
||||
"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 <jobnr>` 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"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,327 @@
|
||||
{
|
||||
"$schema": "../schema/questions.schema.json",
|
||||
"format": "lpic-sim-questions",
|
||||
"meta": {
|
||||
"file": "questions_109.json",
|
||||
"brief": "Fragen zu Topic 109 Netzwerkgrundlagen (LPIC-1 102-500, Objectives 5.0)",
|
||||
"author": "Björn Runden <br@runden.de>",
|
||||
"owner": "Björn Runden <br@runden.de>",
|
||||
"assist": "KI-unterstützt (Claude Opus 5.5), geprüft von Björn Runden <br@runden.de>",
|
||||
"version": "0.1.0 (29.10.2026)"
|
||||
},
|
||||
"exam": "lpic1-102",
|
||||
"questions": [
|
||||
{
|
||||
"id": "109.1-001",
|
||||
"objective": "109.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Subnetzmaske entspricht dem Präfix `/26`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`255.255.255.192`", "correct": true, "explanation": "26 Bits gesetzt: 24 + 2 → letztes Oktett 11000000 = 192." },
|
||||
{ "id": "b", "text": "`255.255.255.128`", "correct": false, "explanation": "Das ist `/25`." },
|
||||
{ "id": "c", "text": "`255.255.255.224`", "correct": false, "explanation": "Das ist `/27`." },
|
||||
{ "id": "d", "text": "`255.255.255.240`", "correct": false, "explanation": "Das ist `/28`." },
|
||||
{ "id": "e", "text": "`255.255.255.252`", "correct": false, "explanation": "Das ist `/30`." }
|
||||
],
|
||||
"explanation": "Werte im letzten Oktett: /25 = 128, /26 = 192, /27 = 224, /28 = 240, /29 = 248, /30 = 252.",
|
||||
"references": ["RFC 4632"]
|
||||
},
|
||||
{
|
||||
"id": "109.1-002",
|
||||
"objective": "109.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Wie viele Adressen stehen in einem IPv4-Subnetz `/27` für Hosts zur Verfügung?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "30", "correct": true, "explanation": "2^(32−27) = 32 Adressen, abzüglich Netz- und Broadcast-Adresse = 30." },
|
||||
{ "id": "b", "text": "32", "correct": false, "explanation": "Das ist die Gesamtzahl der Adressen inklusive Netz- und Broadcast-Adresse." },
|
||||
{ "id": "c", "text": "62", "correct": false, "explanation": "Das gilt für `/26`." },
|
||||
{ "id": "d", "text": "14", "correct": false, "explanation": "Das gilt für `/28`." },
|
||||
{ "id": "e", "text": "27", "correct": false, "explanation": "Das Präfix ist die Zahl der Netzbits, nicht der Hosts." }
|
||||
],
|
||||
"explanation": "Hosts = 2^(32 − Präfix) − 2. Beispiel `192.0.2.32/27`: Netz .32, Hosts .33–.62, Broadcast .63.",
|
||||
"references": ["RFC 950"]
|
||||
},
|
||||
{
|
||||
"id": "109.1-003",
|
||||
"objective": "109.1",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Welchen TCP-Port verwendet SSH standardmäßig? (nur die Zahl)",
|
||||
"answers": ["22"],
|
||||
"explanation": "Zuordnungen von Ports zu Diensten stehen in `/etc/services`.",
|
||||
"references": ["man 5 services"]
|
||||
},
|
||||
{
|
||||
"id": "109.1-004",
|
||||
"objective": "109.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Adresse gehört zu einem **privaten** Adressbereich nach RFC 1918?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`172.20.1.5`", "correct": true, "explanation": "Liegt in `172.16.0.0/12` (172.16.0.0 – 172.31.255.255)." },
|
||||
{ "id": "b", "text": "`172.32.0.1`", "correct": false, "explanation": "Liegt knapp außerhalb von `172.16.0.0/12`." },
|
||||
{ "id": "c", "text": "`192.169.1.1`", "correct": false, "explanation": "Privat ist nur `192.168.0.0/16`." },
|
||||
{ "id": "d", "text": "`100.64.0.1`", "correct": false, "explanation": "`100.64.0.0/10` ist Shared Address Space für Carrier-Grade-NAT (RFC 6598), nicht RFC 1918." },
|
||||
{ "id": "e", "text": "`169.254.1.1`", "correct": false, "explanation": "`169.254.0.0/16` ist Link-Local (automatische Adressvergabe ohne DHCP)." }
|
||||
],
|
||||
"explanation": "RFC 1918: `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`.",
|
||||
"references": ["RFC 1918"]
|
||||
},
|
||||
{
|
||||
"id": "109.1-005",
|
||||
"objective": "109.1",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zu IPv6 treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Eine IPv6-Adresse ist 128 Bit lang.", "correct": true, "explanation": "Geschrieben als 8 Gruppen à 16 Bit in Hexadezimal." },
|
||||
{ "id": "b", "text": "`::1` ist die Loopback-Adresse.", "correct": true, "explanation": "Entspricht `127.0.0.1` bei IPv4." },
|
||||
{ "id": "c", "text": "Adressen aus `fe80::/10` sind global routbar.", "correct": false, "explanation": "`fe80::/10` ist Link-Local und wird nicht geroutet." },
|
||||
{ "id": "d", "text": "IPv6 verwendet Broadcast-Adressen wie IPv4.", "correct": false, "explanation": "IPv6 kennt keinen Broadcast; stattdessen Multicast (z. B. `ff02::1`)." },
|
||||
{ "id": "e", "text": "Mehrere Nullgruppen dürfen mehrfach in einer Adresse mit `::` abgekürzt werden.", "correct": false, "explanation": "`::` darf nur einmal pro Adresse vorkommen, sonst wäre sie mehrdeutig." }
|
||||
],
|
||||
"explanation": "Weitere Unterschiede: SLAAC zur automatischen Konfiguration, Neighbor Discovery statt ARP, Präfix meist `/64` im LAN.",
|
||||
"references": ["RFC 4291"]
|
||||
},
|
||||
{
|
||||
"id": "109.1-006",
|
||||
"objective": "109.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Zuordnung von Standardport zu Dienst ist korrekt?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "443/tcp → HTTPS", "correct": true, "explanation": "HTTP über TLS verwendet Port 443." },
|
||||
{ "id": "b", "text": "25/tcp → POP3", "correct": false, "explanation": "25 ist SMTP; POP3 nutzt 110 (POP3S 995)." },
|
||||
{ "id": "c", "text": "53 → NTP", "correct": false, "explanation": "53 ist DNS; NTP nutzt 123/udp." },
|
||||
{ "id": "d", "text": "143/tcp → SNMP", "correct": false, "explanation": "143 ist IMAP (IMAPS 993); SNMP nutzt 161/udp." },
|
||||
{ "id": "e", "text": "21/tcp → SSH", "correct": false, "explanation": "21 ist FTP (Steuerkanal); SSH nutzt 22." }
|
||||
],
|
||||
"explanation": "Prüfungsrelevant: 20/21 FTP, 22 SSH, 23 Telnet, 25 SMTP, 53 DNS, 80 HTTP, 110 POP3, 123 NTP, 139 NetBIOS, 143 IMAP, 161/162 SNMP, 389 LDAP, 443 HTTPS, 465 SMTPS, 514 syslog, 636 LDAPS, 993 IMAPS, 995 POP3S.",
|
||||
"references": ["man 5 services"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-001",
|
||||
"objective": "109.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welches Kommandozeilenwerkzeug verwaltet Verbindungen des NetworkManager?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`nmcli`", "correct": true, "explanation": "z. B. `nmcli connection show`, `nmcli device status`, `nmcli con up <name>`." },
|
||||
{ "id": "b", "text": "`ifconfig`", "correct": false, "explanation": "Altes Werkzeug (net-tools), das Schnittstellen direkt konfiguriert, ohne NetworkManager." },
|
||||
{ "id": "c", "text": "`iwconfig`", "correct": false, "explanation": "Altes Werkzeug für WLAN-Parameter." },
|
||||
{ "id": "d", "text": "`systemd-networkd`", "correct": false, "explanation": "Ein eigener Netzwerkdienst, kein Frontend für NetworkManager." },
|
||||
{ "id": "e", "text": "`netstat`", "correct": false, "explanation": "Zeigt Verbindungen und Routen, konfiguriert nichts." }
|
||||
],
|
||||
"explanation": "Textoberfläche für NetworkManager: `nmtui`. systemd-networkd wird über `.network`-Dateien und `networkctl` verwaltet.",
|
||||
"references": ["man 1 nmcli"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-002",
|
||||
"objective": "109.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wie setzt man auf einem systemd-System den Hostnamen dauerhaft auf `web01`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`hostnamectl set-hostname web01`", "correct": true, "explanation": "Setzt den Hostnamen sofort und schreibt ihn nach `/etc/hostname`." },
|
||||
{ "id": "b", "text": "`hostname web01`", "correct": false, "explanation": "Gilt nur bis zum nächsten Neustart." },
|
||||
{ "id": "c", "text": "`sysctl kernel.hostname=web01`", "correct": false, "explanation": "Ändert nur den Laufzeitwert im Kernel." },
|
||||
{ "id": "d", "text": "`domainname web01`", "correct": false, "explanation": "Setzt den NIS-Domainnamen." },
|
||||
{ "id": "e", "text": "Nur einen Eintrag in `/etc/hosts` ergänzen", "correct": false, "explanation": "`/etc/hosts` dient der Namensauflösung, nicht dem Setzen des Hostnamens." }
|
||||
],
|
||||
"explanation": "Den eigenen Namen trotzdem in `/etc/hosts` eintragen, damit er lokal auflösbar ist.",
|
||||
"references": ["man 1 hostnamectl"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-003",
|
||||
"objective": "109.2",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "In welcher Datei (vollständiger Pfad) steht der statische Hostname des Systems?",
|
||||
"answers": ["/etc/hostname"],
|
||||
"explanation": "Die Datei enthält nur den Namen in einer Zeile.",
|
||||
"references": ["man 5 hostname"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-004",
|
||||
"objective": "109.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Zeile ist in `/etc/hosts` korrekt aufgebaut?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`192.0.2.10 web01.example.org web01`", "correct": true, "explanation": "IP-Adresse, kanonischer Name, optional Aliase – durch Leerraum getrennt." },
|
||||
{ "id": "b", "text": "`web01.example.org 192.0.2.10`", "correct": false, "explanation": "Die IP-Adresse muss am Anfang stehen." },
|
||||
{ "id": "c", "text": "`192.0.2.10:web01.example.org`", "correct": false, "explanation": "Die Felder werden durch Leerraum getrennt, nicht durch Doppelpunkt." },
|
||||
{ "id": "d", "text": "`host web01 = 192.0.2.10`", "correct": false, "explanation": "Keine gültige Syntax." },
|
||||
{ "id": "e", "text": "`nameserver 192.0.2.10`", "correct": false, "explanation": "Das ist Syntax von `/etc/resolv.conf`." }
|
||||
],
|
||||
"explanation": "Ob `/etc/hosts` vor DNS gefragt wird, legt die Zeile `hosts:` in `/etc/nsswitch.conf` fest.",
|
||||
"references": ["man 5 hosts"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-005",
|
||||
"objective": "109.2",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Befehle setzen (nicht dauerhaft) korrekt eine IPv4-Adresse bzw. das Standard-Gateway?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ip addr add 192.0.2.5/24 dev eth0`", "correct": true, "explanation": "Fügt der Schnittstelle eine Adresse mit Präfix hinzu." },
|
||||
{ "id": "b", "text": "`ip route add default via 192.0.2.1`", "correct": true, "explanation": "Setzt die Standardroute über das Gateway." },
|
||||
{ "id": "c", "text": "`ip addr set eth0 192.0.2.5`", "correct": false, "explanation": "`ip addr` kennt kein `set`; Adressen werden mit `add` hinzugefügt." },
|
||||
{ "id": "d", "text": "`ip gateway add 192.0.2.1`", "correct": false, "explanation": "Ein Objekt `gateway` gibt es bei `ip` nicht." },
|
||||
{ "id": "e", "text": "`ip route default 192.0.2.1`", "correct": false, "explanation": "Es fehlen Aktion (`add`) und Schlüsselwort `via`." }
|
||||
],
|
||||
"explanation": "Mit `ip` gesetzte Werte gehen beim Neustart verloren. Dauerhaft je nach System: NetworkManager, systemd-networkd, netplan oder `/etc/network/interfaces`.",
|
||||
"references": ["man 8 ip-address", "man 8 ip-route"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-006",
|
||||
"objective": "109.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Wo werden auf einem Debian-System mit **ifupdown** Netzwerkschnittstellen dauerhaft konfiguriert?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`/etc/network/interfaces`", "correct": true, "explanation": "Dort stehen z. B. `auto eth0` und `iface eth0 inet static` mit `address`, `gateway`; aktivieren mit `ifup`." },
|
||||
{ "id": "b", "text": "`/etc/sysconfig/network-scripts/ifcfg-eth0`", "correct": false, "explanation": "Klassischer Ort der Red-Hat-Familie, nicht Debian." },
|
||||
{ "id": "c", "text": "`/etc/netplan/01-netcfg.yaml`", "correct": false, "explanation": "netplan wird bei Ubuntu verwendet und erzeugt Konfiguration für networkd oder NetworkManager." },
|
||||
{ "id": "d", "text": "`/etc/resolv.conf`", "correct": false, "explanation": "Enthält nur DNS-Einstellungen." },
|
||||
{ "id": "e", "text": "`/etc/hosts`", "correct": false, "explanation": "Statische Namensauflösung, keine Schnittstellenkonfiguration." }
|
||||
],
|
||||
"explanation": "Hinweis: LPI hat angekündigt, `ifup`/`ifdown` und net-tools künftig aus den Objectives zu entfernen; in Version 5.0 sind sie noch enthalten (Stand 29.10.2026).",
|
||||
"references": ["man 5 interfaces"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-001",
|
||||
"objective": "109.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Auf welchem Protokoll und welchen Nachrichten beruht `ping`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "ICMP Echo Request / Echo Reply", "correct": true, "explanation": "`ping` sendet ICMP Echo Requests und wertet die Antworten aus (IPv6: ICMPv6, `ping -6`)." },
|
||||
{ "id": "b", "text": "UDP-Pakete an Port 7", "correct": false, "explanation": "Port 7 ist der echo-Dienst; `ping` nutzt ihn nicht." },
|
||||
{ "id": "c", "text": "TCP-SYN-Pakete", "correct": false, "explanation": "TCP wird von `ping` nicht verwendet." },
|
||||
{ "id": "d", "text": "ARP Requests", "correct": false, "explanation": "ARP löst im LAN IP- in MAC-Adressen auf (`arping` nutzt ARP)." },
|
||||
{ "id": "e", "text": "DNS-Anfragen", "correct": false, "explanation": "DNS wird höchstens zur Auflösung des Zielnamens genutzt." }
|
||||
],
|
||||
"explanation": "Keine Antwort auf ping heißt nicht zwingend, dass der Host aus ist – ICMP kann gefiltert sein.",
|
||||
"references": ["man 8 ping"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-002",
|
||||
"objective": "109.3",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welcher Befehl listet alle lauschenden TCP- und UDP-Ports numerisch mit den zugehörigen Prozessen?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ss -tulpn`", "correct": true, "explanation": "`-t` TCP, `-u` UDP, `-l` lauschend, `-p` Prozess, `-n` numerisch." },
|
||||
{ "id": "b", "text": "`netstat -r`", "correct": false, "explanation": "`-r` zeigt die Routingtabelle." },
|
||||
{ "id": "c", "text": "`ip link show`", "correct": false, "explanation": "Zeigt Schnittstellen und deren Status." },
|
||||
{ "id": "d", "text": "`ss -s`", "correct": false, "explanation": "Zeigt nur eine Zusammenfassung der Sockets." },
|
||||
{ "id": "e", "text": "`nc -l 22`", "correct": false, "explanation": "Startet selbst einen lauschenden Socket." }
|
||||
],
|
||||
"explanation": "Die alte Entsprechung ist `netstat -tulpn` (net-tools). Prozessangaben fremder Benutzer sieht nur root.",
|
||||
"references": ["man 8 ss"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-003",
|
||||
"objective": "109.3",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welchem Befehl (nur der Name) ermittelt man die Router (Hops) auf dem Weg zu einem Zielhost?",
|
||||
"answers": ["traceroute", "tracepath", "traceroute6", "tracepath6", "mtr"],
|
||||
"explanation": "`traceroute` erhöht schrittweise die TTL und wertet die ICMP-Antworten „Time Exceeded“ aus. `tracepath` braucht keine Root-Rechte und ermittelt zusätzlich die Path-MTU.",
|
||||
"references": ["man 8 traceroute", "man 8 tracepath"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-004",
|
||||
"objective": "109.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl zeigt die aktuelle Routingtabelle an?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ip route`", "correct": true, "explanation": "Kurz `ip r`; zeigt u. a. die `default`-Route." },
|
||||
{ "id": "b", "text": "`ip addr`", "correct": false, "explanation": "Zeigt die Adressen der Schnittstellen." },
|
||||
{ "id": "c", "text": "`ip neigh`", "correct": false, "explanation": "Zeigt den Neighbor-/ARP-Cache." },
|
||||
{ "id": "d", "text": "`ss -r`", "correct": false, "explanation": "`-r` löst bei `ss` Namen auf; es zeigt keine Routen." },
|
||||
{ "id": "e", "text": "`host -r`", "correct": false, "explanation": "`host` ist ein DNS-Abfragewerkzeug." }
|
||||
],
|
||||
"explanation": "Alte Werkzeuge: `route -n`, `netstat -rn`. Welche Route für ein Ziel gilt: `ip route get 198.51.100.7`.",
|
||||
"references": ["man 8 ip-route"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-005",
|
||||
"objective": "109.3",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Mit welchen Befehlen kann man prüfen, ob ein Server Verbindungen auf **TCP-Port 443** annimmt?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`nc -zv server.example.org 443`", "correct": true, "explanation": "`-z` baut nur die Verbindung auf, ohne Daten zu senden; `-v` meldet das Ergebnis." },
|
||||
{ "id": "b", "text": "`telnet server.example.org 443`", "correct": true, "explanation": "Kommt eine Verbindung zustande, nimmt der Port Verbindungen an." },
|
||||
{ "id": "c", "text": "`ping -p 443 server.example.org`", "correct": false, "explanation": "`-p` legt bei ping ein Füllmuster fest; ICMP kennt keine Ports." },
|
||||
{ "id": "d", "text": "`dig server.example.org 443`", "correct": false, "explanation": "`dig` stellt nur DNS-Anfragen." },
|
||||
{ "id": "e", "text": "`ip neigh server.example.org 443`", "correct": false, "explanation": "Zeigt den Neighbor-Cache und prüft keine Ports." }
|
||||
],
|
||||
"explanation": "Vorgehen bei Netzproblemen von unten nach oben: Link (`ip link`) → Adresse (`ip addr`) → Gateway (`ping`) → Route (`ip route`, `traceroute`) → DNS (`dig`) → Port (`nc`).",
|
||||
"references": ["man 1 nc"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-006",
|
||||
"objective": "109.3",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "`ping 198.51.100.7` funktioniert, `ping www.example.org` meldet jedoch „Name or service not known“. Was sollte man als Erstes prüfen?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Die Namensauflösung, z. B. `/etc/resolv.conf` bzw. `resolvectl status`", "correct": true, "explanation": "IP-Verbindung und Routing funktionieren; nur der Name lässt sich nicht auflösen." },
|
||||
{ "id": "b", "text": "Ob ein Standard-Gateway gesetzt ist", "correct": false, "explanation": "Der Ping an eine entfernte IP funktioniert – Routing ist also in Ordnung." },
|
||||
{ "id": "c", "text": "Ob die Netzwerkkarte einen Link hat", "correct": false, "explanation": "Ohne Link wäre auch der Ping an die IP gescheitert." },
|
||||
{ "id": "d", "text": "Ob eine Firewall ICMP blockiert", "correct": false, "explanation": "ICMP kommt durch, wie der erste Ping zeigt." },
|
||||
{ "id": "e", "text": "Ob die MTU zu groß ist", "correct": false, "explanation": "MTU-Probleme zeigen sich nicht als Fehler bei der Namensauflösung." }
|
||||
],
|
||||
"explanation": "DNS gezielt testen: `dig www.example.org`, `host www.example.org`, `getent hosts www.example.org`.",
|
||||
"references": ["man 5 resolv.conf"]
|
||||
},
|
||||
{
|
||||
"id": "109.4-001",
|
||||
"objective": "109.4",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Datei legt fest, in welcher Reihenfolge Quellen wie `files` (also `/etc/hosts`) und `dns` zur Auflösung von Hostnamen befragt werden?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`/etc/nsswitch.conf`", "correct": true, "explanation": "Zeile z. B. `hosts: files dns`." },
|
||||
{ "id": "b", "text": "`/etc/resolv.conf`", "correct": false, "explanation": "Enthält die DNS-Server und Suchdomänen, nicht die Reihenfolge der Quellen." },
|
||||
{ "id": "c", "text": "`/etc/hosts`", "correct": false, "explanation": "Ist selbst eine Quelle (`files`)." },
|
||||
{ "id": "d", "text": "`/etc/hostname`", "correct": false, "explanation": "Enthält den eigenen Hostnamen." },
|
||||
{ "id": "e", "text": "`/etc/systemd/resolved.conf`", "correct": false, "explanation": "Konfiguriert den Dienst systemd-resolved, nicht die NSS-Reihenfolge." }
|
||||
],
|
||||
"explanation": "NSS (Name Service Switch) regelt auch `passwd`, `group` usw.; `getent` fragt genau diese Kette ab.",
|
||||
"references": ["man 5 nsswitch.conf"]
|
||||
},
|
||||
{
|
||||
"id": "109.4-002",
|
||||
"objective": "109.4",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welchem Schlüsselwort trägt man in `/etc/resolv.conf` einen DNS-Server ein?",
|
||||
"answers": ["nameserver"],
|
||||
"explanation": "Beispiel: `nameserver 192.0.2.53`. Weitere Schlüsselwörter: `search`, `domain`, `options`. Bei systemd-resolved verweist die Datei oft auf den Stub `127.0.0.53`.",
|
||||
"references": ["man 5 resolv.conf"]
|
||||
},
|
||||
{
|
||||
"id": "109.4-003",
|
||||
"objective": "109.4",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Programme stellen **gezielt DNS-Anfragen** an einen Nameserver (ohne `/etc/hosts` zu berücksichtigen)?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`dig`", "correct": true, "explanation": "Ausführliche Abfragen, z. B. `dig @192.0.2.53 example.org MX`." },
|
||||
{ "id": "b", "text": "`host`", "correct": true, "explanation": "Kompakte Ausgabe, z. B. `host example.org`." },
|
||||
{ "id": "c", "text": "`nslookup`", "correct": true, "explanation": "Älteres, interaktiv nutzbares DNS-Werkzeug." },
|
||||
{ "id": "d", "text": "`getent hosts`", "correct": false, "explanation": "Fragt über NSS ab – also auch `/etc/hosts` gemäß `nsswitch.conf`." },
|
||||
{ "id": "e", "text": "`ip neigh`", "correct": false, "explanation": "Zeigt den ARP-/Neighbor-Cache." }
|
||||
],
|
||||
"explanation": "Ein Name ist per `dig` auflösbar, Programme finden ihn trotzdem nicht? Dann `nsswitch.conf` und `/etc/hosts` prüfen – und umgekehrt.",
|
||||
"references": ["man 1 dig", "man 1 host"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
{
|
||||
"$schema": "../schema/questions.schema.json",
|
||||
"format": "lpic-sim-questions",
|
||||
"meta": {
|
||||
"file": "questions_110.json",
|
||||
"brief": "Fragen zu Topic 110 Sicherheit (LPIC-1 102-500, Objectives 5.0)",
|
||||
"author": "Björn Runden <br@runden.de>",
|
||||
"owner": "Björn Runden <br@runden.de>",
|
||||
"assist": "KI-unterstützt (Claude Opus 5.5), geprüft von Björn Runden <br@runden.de>",
|
||||
"version": "0.1.0 (29.10.2026)"
|
||||
},
|
||||
"exam": "lpic1-102",
|
||||
"questions": [
|
||||
{
|
||||
"id": "110.1-001",
|
||||
"objective": "110.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welcher Befehl findet alle Dateien, bei denen das **SUID-Bit** gesetzt ist?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`find / -perm -4000 -type f`", "correct": true, "explanation": "`-perm -4000`: mindestens das SUID-Bit gesetzt, andere Bits beliebig." },
|
||||
{ "id": "b", "text": "`find / -perm 4000 -type f`", "correct": false, "explanation": "Ohne `-` müssen die Rechte **exakt** 4000 sein – praktisch keine Datei." },
|
||||
{ "id": "c", "text": "`find / -perm -2000 -type f`", "correct": false, "explanation": "2000 ist das SGID-Bit." },
|
||||
{ "id": "d", "text": "`find / -type s`", "correct": false, "explanation": "`-type s` findet Sockets." },
|
||||
{ "id": "e", "text": "`find / -user root -type f`", "correct": false, "explanation": "Findet alle Dateien von root, unabhängig von SUID." }
|
||||
],
|
||||
"explanation": "`-perm /6000` findet Dateien mit SUID **oder** SGID. Unerwartete SUID-Programme sind ein Sicherheitsrisiko.",
|
||||
"references": ["man 1 find"]
|
||||
},
|
||||
{
|
||||
"id": "110.1-002",
|
||||
"objective": "110.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wie bearbeitet man die sudo-Konfiguration `/etc/sudoers` sicher?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Mit `visudo`", "correct": true, "explanation": "`visudo` sperrt die Datei und prüft die Syntax vor dem Speichern; ein Fehler könnte sonst sudo unbenutzbar machen." },
|
||||
{ "id": "b", "text": "Direkt mit `vi /etc/sudoers`", "correct": false, "explanation": "Keine Syntaxprüfung – ein Tippfehler kann den Zugriff auf sudo sperren." },
|
||||
{ "id": "c", "text": "Mit `sudo -l`", "correct": false, "explanation": "`sudo -l` zeigt nur die erlaubten Befehle des Benutzers." },
|
||||
{ "id": "d", "text": "Mit `chmod 777 /etc/sudoers` und einem Editor", "correct": false, "explanation": "sudo verweigert den Dienst bei falschen Rechten; zudem wäre das ein Sicherheitsloch." },
|
||||
{ "id": "e", "text": "Mit `su -c sudoers`", "correct": false, "explanation": "Führt einen Befehl `sudoers` als root aus – den es nicht gibt." }
|
||||
],
|
||||
"explanation": "Ergänzungen besser als eigene Dateien unter `/etc/sudoers.d/` (`visudo -f /etc/sudoers.d/team`). Beispielzeile: `%admin ALL=(ALL) ALL`.",
|
||||
"references": ["man 8 visudo", "man 5 sudoers"]
|
||||
},
|
||||
{
|
||||
"id": "110.1-003",
|
||||
"objective": "110.1",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl (nur der Name) zeigt die Liste der letzten Anmeldungen und Neustarts aus `/var/log/wtmp`?",
|
||||
"answers": ["last"],
|
||||
"explanation": "`last` liest `wtmp`, `lastb` die fehlgeschlagenen Anmeldungen aus `btmp`. Aktuell angemeldete Benutzer zeigen `who` und `w`.",
|
||||
"references": ["man 1 last"]
|
||||
},
|
||||
{
|
||||
"id": "110.1-004",
|
||||
"objective": "110.1",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ulimit -n` zeigt die maximale Anzahl offener Dateien für die aktuelle Shell.", "correct": true, "explanation": "`ulimit -a` zeigt alle Limits; dauerhaft per `/etc/security/limits.conf`." },
|
||||
{ "id": "b", "text": "`who` zeigt die aktuell angemeldeten Benutzer.", "correct": true, "explanation": "Liest `utmp`; `w` zeigt zusätzlich deren Aktivität." },
|
||||
{ "id": "c", "text": "`su -` übernimmt die Umgebung des aufrufenden Benutzers unverändert.", "correct": false, "explanation": "`su -` startet eine Login-Shell mit der Umgebung des Zielbenutzers." },
|
||||
{ "id": "d", "text": "`sudo -l` zeigt das Passwort von root an.", "correct": false, "explanation": "Es listet die per sudo erlaubten Befehle." },
|
||||
{ "id": "e", "text": "`chage -l anna` sperrt das Konto von `anna`.", "correct": false, "explanation": "`chage -l` zeigt nur die Passwort-Alterung an." }
|
||||
],
|
||||
"explanation": "Sicherheitsrelevante Befehle aus 110.1: `find`, `passwd`, `fuser`, `lsof`, `nmap`, `chage`, `netstat`, `sudo`, `su`, `usermod`, `ulimit`, `who`, `w`, `last`.",
|
||||
"references": ["help ulimit", "man 1 who"]
|
||||
},
|
||||
{
|
||||
"id": "110.2-001",
|
||||
"objective": "110.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Ein nicht benötigter Dienst soll sofort gestoppt werden und beim nächsten Start nicht mehr starten. Welcher Befehl leistet beides?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`systemctl disable --now dienst`", "correct": true, "explanation": "`disable` entfernt die Autostart-Verknüpfungen, `--now` stoppt zusätzlich sofort." },
|
||||
{ "id": "b", "text": "`systemctl stop dienst`", "correct": false, "explanation": "Stoppt nur; beim nächsten Start läuft der Dienst wieder." },
|
||||
{ "id": "c", "text": "`systemctl reload dienst`", "correct": false, "explanation": "Lässt den Dienst seine Konfiguration neu lesen." },
|
||||
{ "id": "d", "text": "`systemctl status dienst`", "correct": false, "explanation": "Zeigt nur den Zustand." },
|
||||
{ "id": "e", "text": "`systemctl isolate dienst`", "correct": false, "explanation": "`isolate` ist für Targets gedacht und beendet alle nicht zugehörigen Units." }
|
||||
],
|
||||
"explanation": "Noch strenger: `systemctl mask` verhindert auch den manuellen Start oder den Start als Abhängigkeit. Grundsatz: Was nicht läuft, kann nicht angegriffen werden.",
|
||||
"references": ["man 1 systemctl"]
|
||||
},
|
||||
{
|
||||
"id": "110.2-002",
|
||||
"objective": "110.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Was bedeutet ein `!` am Anfang des Passwortfelds eines Eintrags in `/etc/shadow`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Das Passwort ist gesperrt; eine Anmeldung per Passwort ist nicht möglich.", "correct": true, "explanation": "Gesetzt z. B. durch `passwd -l` oder `usermod -L`; der ursprüngliche Hash bleibt dahinter erhalten." },
|
||||
{ "id": "b", "text": "Das Konto hat kein Passwort; Anmeldung ohne Passwort ist möglich.", "correct": false, "explanation": "Ein **leeres** Feld bedeutet kein Passwort." },
|
||||
{ "id": "c", "text": "Das Passwort muss bei der nächsten Anmeldung geändert werden.", "correct": false, "explanation": "Das wird über das Feld „letzte Änderung“ = 0 erreicht (`chage -d 0`)." },
|
||||
{ "id": "d", "text": "Der Hash wurde mit SHA-512 erzeugt.", "correct": false, "explanation": "Das Verfahren erkennt man am Präfix, z. B. `$6$` für SHA-512 oder `$y$` für yescrypt." },
|
||||
{ "id": "e", "text": "Der Benutzer ist Mitglied der Gruppe `wheel`.", "correct": false, "explanation": "Gruppenmitgliedschaften stehen in `/etc/group`." }
|
||||
],
|
||||
"explanation": "`*` oder `!` allein werden für Systemkonten verwendet, die sich nie mit Passwort anmelden sollen.",
|
||||
"references": ["man 5 shadow"]
|
||||
},
|
||||
{
|
||||
"id": "110.2-003",
|
||||
"objective": "110.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "`/etc/hosts.allow` ist leer, `/etc/hosts.deny` enthält `ALL: ALL`. Was bewirkt das bei Diensten, die TCP-Wrapper (libwrap) verwenden?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Alle Zugriffe auf diese Dienste werden von allen Hosts abgewiesen.", "correct": true, "explanation": "Zuerst wird `hosts.allow` geprüft (kein Treffer), dann `hosts.deny`: Alle Dienste, alle Clients → abgelehnt." },
|
||||
{ "id": "b", "text": "Die Kernel-Firewall blockiert sämtlichen Netzwerkverkehr.", "correct": false, "explanation": "TCP-Wrapper wirken nur bei Programmen, die libwrap nutzen, nicht im Kernel." },
|
||||
{ "id": "c", "text": "Alle lokalen Anmeldungen an der Konsole werden verhindert.", "correct": false, "explanation": "Konsolenanmeldungen werden von TCP-Wrappern nicht erfasst." },
|
||||
{ "id": "d", "text": "Alle Zugriffe werden erlaubt, weil `hosts.deny` zuerst gelesen wird.", "correct": false, "explanation": "Die Reihenfolge ist `hosts.allow`, dann `hosts.deny`." },
|
||||
{ "id": "e", "text": "Nichts, weil die Syntax ungültig ist.", "correct": false, "explanation": "`dienst: client` mit `ALL` als Platzhalter ist gültig." }
|
||||
],
|
||||
"explanation": "Typisches Muster: `hosts.deny` = `ALL: ALL`, Ausnahmen in `hosts.allow`, z. B. `sshd: 192.0.2.`. Laut LPI sollen TCP-Wrapper künftig aus den Objectives entfallen; in 5.0 sind sie noch enthalten (Stand 29.10.2026).",
|
||||
"references": ["man 5 hosts_access"]
|
||||
},
|
||||
{
|
||||
"id": "110.2-004",
|
||||
"objective": "110.2",
|
||||
"type": "multi",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welchen Befehlen stellt man fest, welche Netzwerkdienste auf einem Rechner erreichbar sind?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ss -tuln`", "correct": true, "explanation": "Lokale Sicht: alle lauschenden TCP-/UDP-Sockets." },
|
||||
{ "id": "b", "text": "`nmap localhost`", "correct": true, "explanation": "Portscan von außen bzw. lokal; nur gegen eigene Systeme oder mit Erlaubnis." },
|
||||
{ "id": "c", "text": "`systemctl list-timers`", "correct": false, "explanation": "Listet systemd-Timer." },
|
||||
{ "id": "d", "text": "`ip addr`", "correct": false, "explanation": "Zeigt nur Adressen der Schnittstellen." },
|
||||
{ "id": "e", "text": "`lsmod`", "correct": false, "explanation": "Listet Kernelmodule." }
|
||||
],
|
||||
"explanation": "Weitere: `netstat -tuln`, `lsof -i`, `fuser`. Ziel: unnötige Dienste finden und abschalten.",
|
||||
"references": ["man 8 ss", "man 1 nmap"]
|
||||
},
|
||||
{
|
||||
"id": "110.2-005",
|
||||
"objective": "110.2",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Datei (vollständiger Pfad) verhindert, solange sie existiert, die Anmeldung aller Benutzer außer root? Ihr Inhalt wird abgewiesenen Benutzern angezeigt.",
|
||||
"answers": ["/etc/nologin"],
|
||||
"explanation": "Nützlich bei Wartungsarbeiten; `shutdown` legt sie kurz vor dem Herunterfahren automatisch an (bei systemd unter `/run/nologin`).",
|
||||
"references": ["man 5 nologin"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-001",
|
||||
"objective": "110.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welchem Befehl erzeugt ein Benutzer ein neues SSH-Schlüsselpaar vom Typ Ed25519?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ssh-keygen -t ed25519`", "correct": true, "explanation": "Erzeugt `~/.ssh/id_ed25519` (privat) und `~/.ssh/id_ed25519.pub` (öffentlich)." },
|
||||
{ "id": "b", "text": "`ssh-add -t ed25519`", "correct": false, "explanation": "`ssh-add` lädt Schlüssel in den ssh-agent (`-t` = Lebensdauer)." },
|
||||
{ "id": "c", "text": "`ssh-copy-id -t ed25519`", "correct": false, "explanation": "`ssh-copy-id` überträgt einen öffentlichen Schlüssel auf einen Server." },
|
||||
{ "id": "d", "text": "`ssh-agent ed25519`", "correct": false, "explanation": "`ssh-agent` hält entschlüsselte Schlüssel im Speicher, erzeugt aber keine." },
|
||||
{ "id": "e", "text": "`gpg --gen-key --ssh`", "correct": false, "explanation": "`gpg` erzeugt OpenPGP-Schlüssel; die Option `--ssh` gibt es so nicht." }
|
||||
],
|
||||
"explanation": "Weitere Typen: `rsa` (mit `-b 4096`), `ecdsa`. Eine Passphrase schützt den privaten Schlüssel.",
|
||||
"references": ["man 1 ssh-keygen"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-002",
|
||||
"objective": "110.3",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "In welche Datei im Home-Verzeichnis des Zielbenutzers auf dem **Server** gehört der öffentliche Schlüssel, damit eine Anmeldung per Schlüssel möglich ist? (Pfad relativ zum Home oder mit `~`)",
|
||||
"answers": ["~/.ssh/authorized_keys", ".ssh/authorized_keys", "authorized_keys"],
|
||||
"explanation": "Ein Schlüssel pro Zeile; `ssh-copy-id benutzer@server` trägt ihn ein. Zu offene Rechte auf `~/.ssh` (700) oder die Datei (600) lassen sshd den Schlüssel ignorieren.",
|
||||
"references": ["man 8 sshd (Abschnitt AUTHORIZED_KEYS FILE FORMAT)"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-003",
|
||||
"objective": "110.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wozu dient die Datei `~/.ssh/known_hosts` auf dem Client?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Sie speichert die Host-Schlüssel bereits besuchter Server, um sie bei späteren Verbindungen zu prüfen.", "correct": true, "explanation": "Ändert sich der Host-Schlüssel, warnt ssh vor einem möglichen Man-in-the-Middle-Angriff." },
|
||||
{ "id": "b", "text": "Sie enthält die öffentlichen Schlüssel von Benutzern, die sich anmelden dürfen.", "correct": false, "explanation": "Das ist `~/.ssh/authorized_keys` auf dem Server." },
|
||||
{ "id": "c", "text": "Sie enthält den privaten Schlüssel des Benutzers.", "correct": false, "explanation": "Private Schlüssel liegen z. B. in `~/.ssh/id_ed25519`." },
|
||||
{ "id": "d", "text": "Sie listet die Hosts, die per SSH gesperrt sind.", "correct": false, "explanation": "Eine Sperrliste ist das nicht." },
|
||||
{ "id": "e", "text": "Sie enthält die Client-Einstellungen wie Benutzername und Port je Host.", "correct": false, "explanation": "Das ist `~/.ssh/config`." }
|
||||
],
|
||||
"explanation": "Einen veralteten Eintrag entfernt man mit `ssh-keygen -R host`. Die Host-Schlüssel des Servers liegen in `/etc/ssh/ssh_host_*`.",
|
||||
"references": ["man 1 ssh (Abschnitt VERIFYING HOST KEYS)"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-004",
|
||||
"objective": "110.3",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Die Datei `vertrag.pdf` soll mit GnuPG so verschlüsselt werden, dass nur `anna@example.org` sie entschlüsseln kann. Welcher Befehl ist korrekt?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`gpg --encrypt --recipient anna@example.org vertrag.pdf`", "correct": true, "explanation": "Verschlüsselt mit Annas öffentlichem Schlüssel; Ergebnis `vertrag.pdf.gpg`." },
|
||||
{ "id": "b", "text": "`gpg --sign --recipient anna@example.org vertrag.pdf`", "correct": false, "explanation": "`--sign` signiert mit dem eigenen privaten Schlüssel; verschlüsselt wird nicht." },
|
||||
{ "id": "c", "text": "`gpg --export anna@example.org vertrag.pdf`", "correct": false, "explanation": "`--export` gibt öffentliche Schlüssel aus." },
|
||||
{ "id": "d", "text": "`gpg --decrypt --recipient anna@example.org vertrag.pdf`", "correct": false, "explanation": "`--decrypt` entschlüsselt." },
|
||||
{ "id": "e", "text": "`gpg --gen-key anna@example.org vertrag.pdf`", "correct": false, "explanation": "`--gen-key` erzeugt ein neues eigenes Schlüsselpaar." }
|
||||
],
|
||||
"explanation": "Dazu muss Annas öffentlicher Schlüssel importiert sein (`gpg --import`). Signatur prüfen: `gpg --verify`. Schlüssel widerrufen: Widerrufszertifikat (`--gen-revoke`).",
|
||||
"references": ["man 1 gpg"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-005",
|
||||
"objective": "110.3",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zu OpenSSH treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Mit `ssh -L 8080:localhost:80 benutzer@server` wird der lokale Port 8080 über SSH an Port 80 des Servers weitergeleitet.", "correct": true, "explanation": "Lokales Port-Forwarding; „localhost“ ist aus Sicht des Servers gemeint." },
|
||||
{ "id": "b", "text": "`ssh-agent` hält entschlüsselte private Schlüssel im Speicher, sodass die Passphrase nur einmal eingegeben werden muss.", "correct": true, "explanation": "Schlüssel werden mit `ssh-add` in den Agent geladen." },
|
||||
{ "id": "c", "text": "Ein privater Schlüssel sollte die Rechte 644 haben.", "correct": false, "explanation": "Private Schlüssel nur für den Eigentümer lesbar (600); sonst verweigert ssh sie." },
|
||||
{ "id": "d", "text": "`ssh -R` startet auf dem Server eine grafische X11-Sitzung.", "correct": false, "explanation": "`-R` richtet Remote-Port-Forwarding ein; X11-Weiterleitung ist `-X`/`-Y`." },
|
||||
{ "id": "e", "text": "Die Server-Konfiguration steht in `~/.ssh/config`.", "correct": false, "explanation": "Server: `/etc/ssh/sshd_config`; `~/.ssh/config` ist Client-Konfiguration." }
|
||||
],
|
||||
"explanation": "Härtung in `sshd_config`: z. B. `PermitRootLogin no`, `PasswordAuthentication no`.",
|
||||
"references": ["man 1 ssh", "man 5 sshd_config"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-006",
|
||||
"objective": "110.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Nach `ssh-keygen -t ed25519` mit Standardnamen: Welche Datei ist der **private** Schlüssel?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`~/.ssh/id_ed25519`", "correct": true, "explanation": "Die Datei ohne Endung ist der private Schlüssel; sie darf das System nie verlassen." },
|
||||
{ "id": "b", "text": "`~/.ssh/id_ed25519.pub`", "correct": false, "explanation": "`.pub` ist der öffentliche Schlüssel, der auf Server verteilt wird." },
|
||||
{ "id": "c", "text": "`~/.ssh/authorized_keys`", "correct": false, "explanation": "Liste erlaubter öffentlicher Schlüssel (serverseitig)." },
|
||||
{ "id": "d", "text": "`~/.ssh/known_hosts`", "correct": false, "explanation": "Host-Schlüssel bekannter Server." },
|
||||
{ "id": "e", "text": "`/etc/ssh/ssh_host_ed25519_key`", "correct": false, "explanation": "Privater **Host**-Schlüssel des SSH-Servers, nicht des Benutzers." }
|
||||
],
|
||||
"explanation": "Öffentliche und private Schlüssel gibt es auch beim Server (Host-Schlüssel). Benutzer- und Host-Schlüssel nicht verwechseln.",
|
||||
"references": ["man 1 ssh-keygen"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user