neue Fragn
This commit is contained in:
1 parent
07dbc01c92
commit
6a8035cced
16 files changed
+3422
-16
No files matched your search
@@ -0,0 +1,221 @@
|
||||
{
|
||||
"$schema": "../schema/questions.schema.json",
|
||||
"format": "lpic-sim-questions",
|
||||
"meta": {
|
||||
"file": "questions_105_set2.json",
|
||||
"brief": "Zweiter Fragensatz 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 (30.10.2026)"
|
||||
},
|
||||
"exam": "lpic1-102",
|
||||
"questions": [
|
||||
{
|
||||
"id": "105.1-007",
|
||||
"objective": "105.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl gibt **nur die Umgebungsvariablen** aus (ohne reine Shell-Variablen und Funktionen)?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`env`", "correct": true, "explanation": "`env` ohne Argumente (wie `printenv`) zeigt die exportierte Umgebung." },
|
||||
{ "id": "b", "text": "`set`", "correct": false, "explanation": "`set` zeigt zusätzlich alle Shell-Variablen und Funktionen." },
|
||||
{ "id": "c", "text": "`declare -f`", "correct": false, "explanation": "`declare -f` zeigt die definierten Funktionen." },
|
||||
{ "id": "d", "text": "`alias`", "correct": false, "explanation": "`alias` zeigt die definierten Aliase." },
|
||||
{ "id": "e", "text": "`export -f`", "correct": false, "explanation": "`export -f name` exportiert eine Funktion; ohne Namen listet es exportierte Funktionen." }
|
||||
],
|
||||
"explanation": "Umgebung = exportierte Variablen, die Kindprozesse erben. `export -p` listet sie in wiederverwendbarer Form.",
|
||||
"references": ["man 1 env", "man 1 printenv"]
|
||||
},
|
||||
{
|
||||
"id": "105.1-008",
|
||||
"objective": "105.1",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Datei im Home-Verzeichnis führt die Bash beim **Beenden einer Login-Shell** aus? (Dateiname)",
|
||||
"answers": ["~/.bash_logout", ".bash_logout"],
|
||||
"explanation": "Typischer Inhalt: Bildschirm leeren (`clear`) oder temporäre Dateien aufräumen.",
|
||||
"references": ["man 1 bash (Abschnitt INVOCATION)"]
|
||||
},
|
||||
{
|
||||
"id": "105.1-009",
|
||||
"objective": "105.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wie entfernt man den Alias `ll` aus der aktuellen Shell?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`unalias ll`", "correct": true, "explanation": "`unalias` entfernt Aliase; `unalias -a` alle." },
|
||||
{ "id": "b", "text": "`unset ll`", "correct": false, "explanation": "`unset` entfernt Variablen und Funktionen, keine Aliase." },
|
||||
{ "id": "c", "text": "`alias ll=''`", "correct": false, "explanation": "Setzt einen leeren Alias – `ll` bleibt definiert." },
|
||||
{ "id": "d", "text": "`alias -d ll`", "correct": false, "explanation": "`alias` kennt keine Option `-d`." },
|
||||
{ "id": "e", "text": "`export -n ll`", "correct": false, "explanation": "`export -n` nimmt Variablen das Export-Attribut, hat mit Aliasen nichts zu tun." }
|
||||
],
|
||||
"explanation": "Ein Alias in `~/.bashrc` kommt in jeder neuen Shell wieder – dort muss er dauerhaft entfernt werden.",
|
||||
"references": ["help unalias"]
|
||||
},
|
||||
{
|
||||
"id": "105.1-010",
|
||||
"objective": "105.1",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Dateien liest eine interaktive **Nicht-Login**-Bash auf einem Debian-System?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`/etc/bash.bashrc`", "correct": true, "explanation": "Systemweite Datei für interaktive Shells (bei Debian einkompiliert)." },
|
||||
{ "id": "b", "text": "`~/.bashrc`", "correct": true, "explanation": "Persönliche Datei für interaktive Nicht-Login-Shells." },
|
||||
{ "id": "c", "text": "`/etc/profile`", "correct": false, "explanation": "Wird nur von Login-Shells gelesen." },
|
||||
{ "id": "d", "text": "`~/.bash_profile`", "correct": false, "explanation": "Wird nur von Login-Shells gelesen." },
|
||||
{ "id": "e", "text": "`~/.bash_logout`", "correct": false, "explanation": "Wird nur beim Beenden einer Login-Shell gelesen." }
|
||||
],
|
||||
"explanation": "Beispiel Nicht-Login-Shell: ein neues Terminalfenster in einer grafischen Sitzung oder `bash` aus einer Shell heraus.",
|
||||
"references": ["man 1 bash (Abschnitt INVOCATION)"]
|
||||
},
|
||||
{
|
||||
"id": "105.1-011",
|
||||
"objective": "105.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Die Shell-Funktion `gruss` soll auch in Bash-Prozessen verfügbar sein, die aus der aktuellen Shell gestartet werden. Welcher Befehl leistet das?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`export -f gruss`", "correct": true, "explanation": "`-f` exportiert die Funktion in die Umgebung; Kind-Bashs übernehmen sie." },
|
||||
{ "id": "b", "text": "`declare -x gruss`", "correct": false, "explanation": "Exportiert eine **Variable** namens `gruss`, nicht die Funktion." },
|
||||
{ "id": "c", "text": "`readonly -f gruss`", "correct": false, "explanation": "Macht die Funktion nur schreibgeschützt." },
|
||||
{ "id": "d", "text": "`local gruss`", "correct": false, "explanation": "`local` legt lokale Variablen innerhalb einer Funktion an." },
|
||||
{ "id": "e", "text": "`alias gruss=gruss`", "correct": false, "explanation": "Aliase werden nie an Kindprozesse vererbt." }
|
||||
],
|
||||
"explanation": "Für Skripte ist meist besser, gemeinsame Funktionen in eine Datei zu legen und mit `source` einzubinden.",
|
||||
"references": ["help export"]
|
||||
},
|
||||
{
|
||||
"id": "105.1-012",
|
||||
"objective": "105.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "`sort` soll **einmalig** mit `LC_ALL=C` laufen, ohne die Variable in der aktuellen Shell zu verändern. Welche Zeile leistet das?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`LC_ALL=C sort liste.txt`", "correct": true, "explanation": "Eine Zuweisung direkt vor dem Befehl gilt nur für diesen einen Prozess." },
|
||||
{ "id": "b", "text": "`export LC_ALL=C; sort liste.txt`", "correct": false, "explanation": "Die Variable bleibt danach in der Shell gesetzt." },
|
||||
{ "id": "c", "text": "`LC_ALL=C; sort liste.txt`", "correct": false, "explanation": "Durch das Semikolon wird die Zuweisung ein eigener Befehl und bleibt in der Shell bestehen." },
|
||||
{ "id": "d", "text": "`sort liste.txt LC_ALL=C`", "correct": false, "explanation": "Hinter dem Befehl ist `LC_ALL=C` nur ein Argument (Dateiname) für `sort`." },
|
||||
{ "id": "e", "text": "`set LC_ALL=C sort liste.txt`", "correct": false, "explanation": "`set` setzt hier Positionsparameter, keine Variable." }
|
||||
],
|
||||
"explanation": "Gleichwertig: `env LC_ALL=C sort liste.txt`. `LC_ALL=C` sorgt für byteweise, reproduzierbare Sortierung.",
|
||||
"references": ["man 1 bash (Abschnitt SIMPLE COMMAND EXPANSION)"]
|
||||
},
|
||||
{
|
||||
"id": "105.1-013",
|
||||
"objective": "105.1",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl (ohne Argumente) listet alle in der aktuellen Shell definierten Aliase auf?",
|
||||
"answers": ["alias", "alias -p"],
|
||||
"explanation": "Ausgabe in der Form `alias ll='ls -l'`, direkt wiederverwendbar.",
|
||||
"references": ["help alias"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-007",
|
||||
"objective": "105.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche `if`-Anweisung ist in der Bash syntaktisch korrekt?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`if [ \"$a\" -eq 5 ]; then echo ja; fi`", "correct": true, "explanation": "Leerzeichen innerhalb der Klammern, `;` bzw. Zeilenumbruch vor `then`, Abschluss mit `fi`." },
|
||||
{ "id": "b", "text": "`if [\"$a\" -eq 5]; then echo ja; fi`", "correct": false, "explanation": "Ohne Leerzeichen sucht die Shell einen Befehl namens `[5` bzw. `[\"…\"`." },
|
||||
{ "id": "c", "text": "`if [ \"$a\" -eq 5 ] then echo ja; fi`", "correct": false, "explanation": "Vor `then` fehlt `;` oder ein Zeilenumbruch." },
|
||||
{ "id": "d", "text": "`if [ \"$a\" -eq 5 ]; then echo ja; endif`", "correct": false, "explanation": "`endif` ist csh-Syntax; die Bash schließt mit `fi`." },
|
||||
{ "id": "e", "text": "`if ( $a -eq 5 ) { echo ja }`", "correct": false, "explanation": "C-ähnliche Syntax; `( )` startet eine Subshell, `{ }` braucht `;`." }
|
||||
],
|
||||
"explanation": "Variablen in `[ ]` immer in Anführungszeichen setzen, sonst entstehen bei leeren Werten Syntaxfehler. Bash-Alternative: `[[ … ]]`.",
|
||||
"references": ["man 1 test", "help if"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-008",
|
||||
"objective": "105.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welchem Operator prüft `test` bzw. `[ ]`, ob eine **Zahl größer** als eine andere ist?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`-gt`", "correct": true, "explanation": "greater than: `[ \"$n\" -gt 10 ]`." },
|
||||
{ "id": "b", "text": "`>`", "correct": false, "explanation": "In `[ ]` ist `>` eine Umleitung – es entsteht eine Datei namens `10`." },
|
||||
{ "id": "c", "text": "`-ge`", "correct": false, "explanation": "`-ge` bedeutet größer **oder gleich**." },
|
||||
{ "id": "d", "text": "`-lt`", "correct": false, "explanation": "`-lt` bedeutet kleiner als." },
|
||||
{ "id": "e", "text": "`-ne`", "correct": false, "explanation": "`-ne` bedeutet ungleich." }
|
||||
],
|
||||
"explanation": "Zahlen: `-eq -ne -lt -le -gt -ge`. Zeichenketten: `=`, `!=`. In `(( ))` darf man `>` als Zahlvergleich schreiben.",
|
||||
"references": ["man 1 test"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-009",
|
||||
"objective": "105.2",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welcher Anweisung (Befehl mit Argument) beendet sich ein Skript mit dem Exit-Status 3?",
|
||||
"answers": ["exit 3"],
|
||||
"explanation": "Ohne Argument liefert `exit` den Status des zuletzt ausgeführten Befehls. Gültig sind 0–255.",
|
||||
"references": ["help exit"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-010",
|
||||
"objective": "105.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welche `case`-Anweisung ist korrekt aufgebaut?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`case \"$1\" in start) echo an ;; *) echo unbekannt ;; esac`", "correct": true, "explanation": "Muster mit `)`, jeder Zweig endet mit `;;`, Abschluss mit `esac`." },
|
||||
{ "id": "b", "text": "`case \"$1\" in start) echo an ;; done`", "correct": false, "explanation": "`done` beendet Schleifen; `case` endet mit `esac`." },
|
||||
{ "id": "c", "text": "`switch \"$1\" case start: echo an endsw`", "correct": false, "explanation": "Das ist csh-Syntax." },
|
||||
{ "id": "d", "text": "`case \"$1\" { start: echo an }`", "correct": false, "explanation": "C-ähnliche Syntax, in der Bash ungültig." },
|
||||
{ "id": "e", "text": "`case \"$1\" in \"start\" then echo an fi`", "correct": false, "explanation": "Vermischt `if`-Syntax mit `case`." }
|
||||
],
|
||||
"explanation": "Muster dürfen Globbing nutzen und mit `|` kombiniert werden: `start|begin)`. `*)` fängt alles Übrige ab.",
|
||||
"references": ["man 1 bash (Abschnitt Compound Commands)"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-011",
|
||||
"objective": "105.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Wie liest ein Skript die Datei `hosts.txt` **zeilenweise** in einer Schleife?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`while read zeile; do echo \"$zeile\"; done < hosts.txt`", "correct": true, "explanation": "Die Umleitung gilt für die ganze Schleife; `read` liest bei jedem Durchlauf die nächste Zeile." },
|
||||
{ "id": "b", "text": "`for zeile in hosts.txt; do echo \"$zeile\"; done`", "correct": false, "explanation": "Durchläuft nur das eine Wort `hosts.txt`, nicht den Dateiinhalt." },
|
||||
{ "id": "c", "text": "`while read zeile < hosts.txt; do echo \"$zeile\"; done`", "correct": false, "explanation": "Die Datei wird bei jedem Durchlauf neu geöffnet – es wird endlos die erste Zeile gelesen." },
|
||||
{ "id": "d", "text": "`until read zeile; do echo \"$zeile\"; done < hosts.txt`", "correct": false, "explanation": "`until` läuft, solange `read` **fehlschlägt** – also erst am Dateiende." },
|
||||
{ "id": "e", "text": "`read -a zeile hosts.txt`", "correct": false, "explanation": "`read -a` liest eine Zeile in ein Array; `hosts.txt` wäre ein weiterer Variablenname." }
|
||||
],
|
||||
"explanation": "Robuste Form: `while IFS= read -r zeile; do …; done < datei` (keine Backslash-Auswertung, Leerraum bleibt erhalten).",
|
||||
"references": ["help read", "help while"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-012",
|
||||
"objective": "105.2",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zu Shell-Skripten treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`echo $(( 3 + 4 ))` gibt `7` aus.", "correct": true, "explanation": "`$(( ))` ist arithmetische Expansion (Ganzzahlen)." },
|
||||
{ "id": "b", "text": "Bei `befehl1 && befehl2` läuft `befehl2` nur, wenn `befehl1` erfolgreich war.", "correct": true, "explanation": "`&&` prüft den Exit-Status 0." },
|
||||
{ "id": "c", "text": "Bei `befehl1 || befehl2` läuft `befehl2` nur, wenn `befehl1` erfolgreich war.", "correct": false, "explanation": "`||` führt `befehl2` nur bei einem **Fehler** von `befehl1` aus." },
|
||||
{ "id": "d", "text": "`test -z \"$x\"` ist wahr, wenn `$x` nicht leer ist.", "correct": false, "explanation": "`-z` ist wahr bei **leerem** String; `-n` bei nicht leerem." },
|
||||
{ "id": "e", "text": "In doppelten Anführungszeichen verhalten sich `\"$*\"` und `\"$@\"` gleich.", "correct": false, "explanation": "`\"$*\"` ergibt ein einziges Wort, `\"$@\"` jedes Argument als eigenes Wort." }
|
||||
],
|
||||
"explanation": "Typisches Muster: `cd /verzeichnis || exit 1` bricht ab, wenn der Wechsel scheitert.",
|
||||
"references": ["man 1 bash (Abschnitte Lists, Arithmetic Expansion)"]
|
||||
},
|
||||
{
|
||||
"id": "105.2-013",
|
||||
"objective": "105.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl gibt die Zahlen 1 bis 5 jeweils in einer **eigenen Zeile** aus?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`seq 1 5`", "correct": true, "explanation": "`seq` gibt eine Zahlenfolge aus, standardmäßig eine Zahl pro Zeile." },
|
||||
{ "id": "b", "text": "`echo {1..5}`", "correct": false, "explanation": "Die Klammererweiterung erzeugt `1 2 3 4 5` in **einer** Zeile." },
|
||||
{ "id": "c", "text": "`seq 5 1`", "correct": false, "explanation": "Ohne negative Schrittweite (`seq 5 -1 1`) gibt das nichts aus." },
|
||||
{ "id": "d", "text": "`range 1 5`", "correct": false, "explanation": "Einen Befehl `range` gibt es nicht." },
|
||||
{ "id": "e", "text": "`echo $(1..5)`", "correct": false, "explanation": "Befehlsersetzung: Die Shell sucht einen Befehl `1..5`." }
|
||||
],
|
||||
"explanation": "In Schleifen: `for i in $(seq 1 5)` oder `for i in {1..5}`. `seq -w` füllt mit führenden Nullen auf.",
|
||||
"references": ["man 1 seq"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
{
|
||||
"$schema": "../schema/questions.schema.json",
|
||||
"format": "lpic-sim-questions",
|
||||
"meta": {
|
||||
"file": "questions_106_set2.json",
|
||||
"brief": "Zweiter Fragensatz 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 (30.10.2026)"
|
||||
},
|
||||
"exam": "lpic1-102",
|
||||
"questions": [
|
||||
{
|
||||
"id": "106.1-004",
|
||||
"objective": "106.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Mit welchem Befehl erlaubt man einem bestimmten entfernten Rechner **hostbasiert** den Zugriff auf den lokalen X-Server?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`xhost +192.0.2.20`", "correct": true, "explanation": "`xhost +<host>` fügt den Host der Zugriffsliste hinzu; `xhost -<host>` entfernt ihn." },
|
||||
{ "id": "b", "text": "`xauth add 192.0.2.20`", "correct": false, "explanation": "`xauth` verwaltet Cookies (MIT-MAGIC-COOKIE), nicht hostbasierte Freigaben." },
|
||||
{ "id": "c", "text": "`xdpyinfo 192.0.2.20`", "correct": false, "explanation": "`xdpyinfo` zeigt Informationen über einen X-Server an." },
|
||||
{ "id": "d", "text": "`xrandr --allow 192.0.2.20`", "correct": false, "explanation": "`xrandr` stellt Bildschirmauflösung und -anordnung ein." },
|
||||
{ "id": "e", "text": "`startx 192.0.2.20`", "correct": false, "explanation": "`startx` startet einen X-Server mit Sitzung." }
|
||||
],
|
||||
"explanation": "`xhost +` ohne Host schaltet die Zugriffskontrolle ganz ab – unsicher. Besser: X-Weiterleitung über SSH (`ssh -X`).",
|
||||
"references": ["man 1 xhost"]
|
||||
},
|
||||
{
|
||||
"id": "106.1-005",
|
||||
"objective": "106.1",
|
||||
"type": "fill",
|
||||
"difficulty": 2,
|
||||
"question": "In welcher Datei (vollständiger Pfad, klassischer Ablageort) protokolliert der erste Xorg-Server (Display `:0`) seinen Start und erkannte Hardware?",
|
||||
"answers": ["/var/log/Xorg.0.log"],
|
||||
"explanation": "Fehlerzeilen sind mit `(EE)`, Warnungen mit `(WW)` markiert. Läuft Xorg ohne Root-Rechte, liegt das Log oft unter `~/.local/share/xorg/Xorg.0.log`.",
|
||||
"references": ["man 1 Xorg"]
|
||||
},
|
||||
{
|
||||
"id": "106.1-006",
|
||||
"objective": "106.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welches Programm zeigt Informationen über den laufenden X-Server an, z. B. Auflösung, Farbtiefe und unterstützte Erweiterungen?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`xdpyinfo`", "correct": true, "explanation": "display info: Server-Version, Bildschirme, Erweiterungen." },
|
||||
{ "id": "b", "text": "`xwininfo`", "correct": false, "explanation": "`xwininfo` zeigt Informationen zu einem einzelnen Fenster." },
|
||||
{ "id": "c", "text": "`xhost`", "correct": false, "explanation": "`xhost` verwaltet die hostbasierte Zugriffskontrolle." },
|
||||
{ "id": "d", "text": "`xinit`", "correct": false, "explanation": "`xinit` startet einen X-Server und erste Clients." },
|
||||
{ "id": "e", "text": "`xauth`", "correct": false, "explanation": "`xauth` verwaltet Zugriffs-Cookies." }
|
||||
],
|
||||
"explanation": "Weitere X-Werkzeuge aus 106.1: `xwininfo`, `xdpyinfo`, `xhost`, `xauth`, `xrandr`.",
|
||||
"references": ["man 1 xdpyinfo"]
|
||||
},
|
||||
{
|
||||
"id": "106.1-007",
|
||||
"objective": "106.1",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zur X11-Weiterleitung über SSH treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Mit `ssh -X benutzer@server` erscheinen dort gestartete X-Programme auf dem lokalen Bildschirm.", "correct": true, "explanation": "ssh setzt auf dem Server `DISPLAY` (z. B. `localhost:10.0`) und tunnelt die Verbindung." },
|
||||
{ "id": "b", "text": "Der SSH-Server muss `X11Forwarding yes` in `sshd_config` erlauben.", "correct": true, "explanation": "Ohne diese Einstellung lehnt sshd die Weiterleitung ab." },
|
||||
{ "id": "c", "text": "Auf dem Client muss vorher `xhost +` ausgeführt werden.", "correct": false, "explanation": "Nicht nötig – ssh regelt die Authentifizierung per Cookie; `xhost +` wäre unsicher." },
|
||||
{ "id": "d", "text": "Man muss auf dem Server `DISPLAY=:0` setzen.", "correct": false, "explanation": "`:0` wäre der lokale Bildschirm des Servers; ssh setzt `DISPLAY` selbst." },
|
||||
{ "id": "e", "text": "X11-Weiterleitung funktioniert nur über unverschlüsselte Verbindungen.", "correct": false, "explanation": "Gerade der Vorteil: Der X-Verkehr läuft verschlüsselt im SSH-Tunnel." }
|
||||
],
|
||||
"explanation": "`ssh -Y` ist „trusted“ X11-Forwarding mit weniger Einschränkungen durch die X-Security-Extension.",
|
||||
"references": ["man 1 ssh", "man 5 sshd_config"]
|
||||
},
|
||||
{
|
||||
"id": "106.2-003",
|
||||
"objective": "106.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Komponente zeigt die grafische Anmeldemaske an und startet nach erfolgreicher Anmeldung die Desktop-Sitzung?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Der Display-Manager (z. B. GDM, SDDM, LightDM)", "correct": true, "explanation": "Display-Manager übernehmen Anmeldung und Sitzungsstart." },
|
||||
{ "id": "b", "text": "Der Fenstermanager", "correct": false, "explanation": "Er platziert und dekoriert Fenster innerhalb einer laufenden Sitzung." },
|
||||
{ "id": "c", "text": "Der Terminal-Emulator", "correct": false, "explanation": "Er stellt eine Shell in einem Fenster bereit." },
|
||||
{ "id": "d", "text": "Der Dateimanager", "correct": false, "explanation": "Er verwaltet Dateien innerhalb der Sitzung." },
|
||||
{ "id": "e", "text": "Der Druckdienst CUPS", "correct": false, "explanation": "CUPS verwaltet Drucker." }
|
||||
],
|
||||
"explanation": "Ohne Display-Manager startet man X z. B. nach Textanmeldung mit `startx`.",
|
||||
"references": ["LPI 102-500 Objective 106.2"]
|
||||
},
|
||||
{
|
||||
"id": "106.2-004",
|
||||
"objective": "106.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussage zu XDMCP trifft zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Die Verbindung ist unverschlüsselt; XDMCP sollte nur in vertrauenswürdigen Netzen oder über einen Tunnel genutzt werden.", "correct": true, "explanation": "XDMCP und das anschließende X-Protokoll übertragen alles im Klartext." },
|
||||
{ "id": "b", "text": "XDMCP verschlüsselt per TLS.", "correct": false, "explanation": "XDMCP bietet keine Verschlüsselung." },
|
||||
{ "id": "c", "text": "XDMCP verwendet TCP-Port 3389.", "correct": false, "explanation": "3389 ist RDP; XDMCP nutzt UDP-Port 177." },
|
||||
{ "id": "d", "text": "XDMCP ist das Protokoll von VNC.", "correct": false, "explanation": "VNC nutzt RFB." },
|
||||
{ "id": "e", "text": "XDMCP funktioniert nur mit Wayland.", "correct": false, "explanation": "XDMCP gehört zum X Window System." }
|
||||
],
|
||||
"explanation": "XDMCP vermittelt eine Anmeldung am Display-Manager eines entfernten Rechners; die Sitzung läuft dann dort, die Anzeige lokal.",
|
||||
"references": ["LPI 102-500 Objective 106.2"]
|
||||
},
|
||||
{
|
||||
"id": "106.3-003",
|
||||
"objective": "106.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Hilfsfunktion vergrößert einen Ausschnitt des Bildschirms für Menschen mit eingeschränktem Sehvermögen?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Bildschirmlupe", "correct": true, "explanation": "Vergrößert den Bereich um Mauszeiger oder Fokus." },
|
||||
{ "id": "b", "text": "Bildschirmleser", "correct": false, "explanation": "Liest Inhalte vor bzw. gibt sie auf einer Braillezeile aus, vergrößert aber nicht." },
|
||||
{ "id": "c", "text": "Langsame Tasten", "correct": false, "explanation": "Eine Tastaturhilfe gegen versehentliche Anschläge." },
|
||||
{ "id": "d", "text": "Springende Tasten", "correct": false, "explanation": "Ignoriert schnell wiederholte Anschläge." },
|
||||
{ "id": "e", "text": "Maustasten", "correct": false, "explanation": "Steuert den Mauszeiger über den Ziffernblock." }
|
||||
],
|
||||
"explanation": "Für eingeschränktes Sehen: Lupe, große Schriften, Hochkontrast. Für Blinde: Bildschirmleser, Braillezeile.",
|
||||
"references": ["LPI 102-500 Objective 106.3"]
|
||||
},
|
||||
{
|
||||
"id": "106.3-004",
|
||||
"objective": "106.3",
|
||||
"type": "multi",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Hilfstechnologien richten sich vor allem an **blinde** Nutzer?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Braillezeile", "correct": true, "explanation": "Gibt Text als ertastbare Punktschrift aus." },
|
||||
{ "id": "b", "text": "Bildschirmleser (z. B. Orca)", "correct": true, "explanation": "Liest Inhalte per Sprachsynthese vor." },
|
||||
{ "id": "c", "text": "Hochkontrast-Theme", "correct": false, "explanation": "Hilft bei eingeschränktem Sehvermögen, nicht bei Blindheit." },
|
||||
{ "id": "d", "text": "Bildschirmtastatur", "correct": false, "explanation": "Hilft bei motorischen Einschränkungen." },
|
||||
{ "id": "e", "text": "Maustasten", "correct": false, "explanation": "Hilft bei motorischen Einschränkungen." }
|
||||
],
|
||||
"explanation": "Barrierefreiheit unterscheidet Seh-, Hör- und motorische Einschränkungen; die Hilfen sind entsprechend verschieden.",
|
||||
"references": ["LPI 102-500 Objective 106.3"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,337 @@
|
||||
{
|
||||
"$schema": "../schema/questions.schema.json",
|
||||
"format": "lpic-sim-questions",
|
||||
"meta": {
|
||||
"file": "questions_107_set2.json",
|
||||
"brief": "Zweiter Fragensatz zu Topic 107 Administrative Aufgaben (LPIC-1 102-500, Objectives 5.0)",
|
||||
"author": "Björn Runden <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 (30.10.2026)"
|
||||
},
|
||||
"exam": "lpic1-102",
|
||||
"questions": [
|
||||
{
|
||||
"id": "107.1-009",
|
||||
"objective": "107.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Eintrag in `/etc/group` ist korrekt aufgebaut?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`docker:x:998:anna,bob`", "correct": true, "explanation": "Name, Passwortplatzhalter, GID, Mitglieder durch Komma getrennt." },
|
||||
{ "id": "b", "text": "`docker:998:anna,bob`", "correct": false, "explanation": "Es fehlt das Passwortfeld; die Datei hat vier Felder." },
|
||||
{ "id": "c", "text": "`docker:x:998:anna bob`", "correct": false, "explanation": "Mitglieder werden durch Kommas getrennt, nicht durch Leerzeichen." },
|
||||
{ "id": "d", "text": "`998:docker:x:anna,bob`", "correct": false, "explanation": "Der Gruppenname steht im ersten Feld, die GID im dritten." },
|
||||
{ "id": "e", "text": "`docker:x:anna,bob:998`", "correct": false, "explanation": "Die GID steht vor der Mitgliederliste." }
|
||||
],
|
||||
"explanation": "In der Mitgliederliste stehen nur Zusatzmitglieder; wer die Gruppe als primäre Gruppe hat, steht über die GID in `/etc/passwd`.",
|
||||
"references": ["man 5 group"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-010",
|
||||
"objective": "107.1",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl (mit Argument) zeigt UID, primäre GID und alle Gruppen des Benutzers `anna`?",
|
||||
"answers": ["id anna"],
|
||||
"explanation": "Ausgabe z. B. `uid=1001(anna) gid=1001(anna) groups=1001(anna),998(docker)`. `groups anna` zeigt nur die Gruppennamen.",
|
||||
"references": ["man 1 id"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-011",
|
||||
"objective": "107.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wie legt man die Gruppe `projekt` mit der GID 1500 an?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`groupadd -g 1500 projekt`", "correct": true, "explanation": "`-g` legt die GID fest." },
|
||||
{ "id": "b", "text": "`groupadd projekt 1500`", "correct": false, "explanation": "`groupadd` erwartet nur den Gruppennamen als Argument." },
|
||||
{ "id": "c", "text": "`groupmod -g 1500 projekt`", "correct": false, "explanation": "`groupmod` ändert eine **bestehende** Gruppe." },
|
||||
{ "id": "d", "text": "`newgrp -g 1500 projekt`", "correct": false, "explanation": "`newgrp` wechselt die aktive Gruppe der Shell." },
|
||||
{ "id": "e", "text": "`useradd -g 1500 projekt`", "correct": false, "explanation": "Legt einen **Benutzer** `projekt` mit primärer Gruppe 1500 an." }
|
||||
],
|
||||
"explanation": "Systemgruppen: `groupadd -r`. Umbenennen: `groupmod -n neu alt`.",
|
||||
"references": ["man 8 groupadd"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-012",
|
||||
"objective": "107.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Das Konto `backup` soll für Dienste und Dateibesitz erhalten bleiben, aber **keine interaktive Anmeldung** mehr erlauben. Was ist geeignet?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`usermod -s /usr/sbin/nologin backup`", "correct": true, "explanation": "Bei der Anmeldung startet `nologin`, gibt eine Meldung aus und beendet sich." },
|
||||
{ "id": "b", "text": "`userdel backup`", "correct": false, "explanation": "Löscht das Konto; Dateien gehören danach einer „verwaisten“ UID." },
|
||||
{ "id": "c", "text": "`passwd -d backup`", "correct": false, "explanation": "Löscht das Passwort – je nach Konfiguration wird die Anmeldung damit sogar einfacher." },
|
||||
{ "id": "d", "text": "`usermod -G nologin backup`", "correct": false, "explanation": "Setzt die Zusatzgruppe `nologin`, die es normalerweise nicht gibt." },
|
||||
{ "id": "e", "text": "`chage -M 0 backup`", "correct": false, "explanation": "Erzwingt nur eine sofortige Passwortänderung." }
|
||||
],
|
||||
"explanation": "Systemkonten erhalten typischerweise `/usr/sbin/nologin` oder `/bin/false` als Shell.",
|
||||
"references": ["man 8 nologin", "man 8 usermod"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-013",
|
||||
"objective": "107.1",
|
||||
"type": "multi",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welchen Befehlen ändert man die Login-Shell eines Benutzers?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`chsh -s /bin/zsh anna`", "correct": true, "explanation": "`chsh` ändert die Shell; normale Benutzer dürfen ihre eigene ändern (auf Shells aus `/etc/shells`)." },
|
||||
{ "id": "b", "text": "`usermod -s /bin/zsh anna`", "correct": true, "explanation": "`usermod -s` setzt das siebte Feld in `/etc/passwd` (nur root)." },
|
||||
{ "id": "c", "text": "`chfn -s /bin/zsh anna`", "correct": false, "explanation": "`chfn` ändert die GECOS-Angaben (Name, Telefon)." },
|
||||
{ "id": "d", "text": "`usermod -c /bin/zsh anna`", "correct": false, "explanation": "`-c` setzt den Kommentar (GECOS)." },
|
||||
{ "id": "e", "text": "`chage -s /bin/zsh anna`", "correct": false, "explanation": "`chage` verwaltet die Passwort-Alterung." }
|
||||
],
|
||||
"explanation": "`/etc/shells` listet die gültigen Login-Shells.",
|
||||
"references": ["man 1 chsh"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-014",
|
||||
"objective": "107.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "In welcher Datei stehen u. a. die UID-Bereiche für normale Benutzer (`UID_MIN`, `UID_MAX`) und Standardwerte der Passwort-Alterung (`PASS_MAX_DAYS`)?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`/etc/login.defs`", "correct": true, "explanation": "Sie gilt für `useradd`, `groupadd`, `passwd` und weitere Shadow-Werkzeuge." },
|
||||
{ "id": "b", "text": "`/etc/default/useradd`", "correct": false, "explanation": "Enthält Vorgaben wie `SHELL`, `HOME`, `SKEL`, aber keine UID-Bereiche." },
|
||||
{ "id": "c", "text": "`/etc/security/limits.conf`", "correct": false, "explanation": "Legt Ressourcenlimits pro Benutzer fest." },
|
||||
{ "id": "d", "text": "`/etc/shells`", "correct": false, "explanation": "Listet erlaubte Login-Shells." },
|
||||
{ "id": "e", "text": "`/etc/pam.d/passwd`", "correct": false, "explanation": "PAM-Konfiguration für das Programm `passwd`." }
|
||||
],
|
||||
"explanation": "Die Alterungswerte aus `login.defs` gelten nur für neu angelegte Konten; bestehende ändert man mit `chage`.",
|
||||
"references": ["man 5 login.defs"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-015",
|
||||
"objective": "107.1",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl (mit Option und Benutzername) zeigt die Passwort-Alterungsdaten des Benutzers `anna` an?",
|
||||
"answers": ["chage -l anna", "chage --list anna"],
|
||||
"explanation": "Zeigt letzte Änderung, Ablauf von Passwort und Konto sowie Mindest-/Höchstdauer und Warnzeit.",
|
||||
"references": ["man 1 chage"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-016",
|
||||
"objective": "107.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Datei enthält Gruppenpasswörter und die Gruppenadministratoren?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`/etc/gshadow`", "correct": true, "explanation": "Felder: Name, Passwort, Administratoren, Mitglieder; nur für root lesbar." },
|
||||
{ "id": "b", "text": "`/etc/group`", "correct": false, "explanation": "Enthält GID und Mitglieder, im Passwortfeld nur `x`." },
|
||||
{ "id": "c", "text": "`/etc/shadow`", "correct": false, "explanation": "Enthält die Passwörter der **Benutzer**." },
|
||||
{ "id": "d", "text": "`/etc/sudoers`", "correct": false, "explanation": "Regelt sudo-Berechtigungen." },
|
||||
{ "id": "e", "text": "`/etc/groups`", "correct": false, "explanation": "Diese Datei gibt es nicht." }
|
||||
],
|
||||
"explanation": "Gruppenadministratoren verwalten Mitglieder mit `gpasswd -a/-d`. Gruppenpasswörter werden kaum noch genutzt.",
|
||||
"references": ["man 5 gshadow", "man 1 gpasswd"]
|
||||
},
|
||||
{
|
||||
"id": "107.1-017",
|
||||
"objective": "107.1",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Was geschieht bei `userdel anna` **ohne** weitere Optionen?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Die Einträge von `anna` in `/etc/passwd` und `/etc/shadow` werden entfernt.", "correct": true, "explanation": "Das Konto selbst wird gelöscht." },
|
||||
{ "id": "b", "text": "Das Home-Verzeichnis `/home/anna` bleibt erhalten.", "correct": true, "explanation": "Erst `-r` entfernt Home-Verzeichnis und Mail-Spool." },
|
||||
{ "id": "c", "text": "Alle Dateien von `anna` im gesamten System werden gelöscht.", "correct": false, "explanation": "Dateien außerhalb des Homes bleiben immer erhalten – mit `find / -nouser` findet man sie." },
|
||||
{ "id": "d", "text": "Laufende Prozesse von `anna` werden automatisch beendet.", "correct": false, "explanation": "`userdel` verweigert das Löschen, solange der Benutzer angemeldet ist (`-f` erzwingt)." },
|
||||
{ "id": "e", "text": "Die gleichnamige private Gruppe bleibt in jedem Fall bestehen.", "correct": false, "explanation": "Mit `USERGROUPS_ENAB yes` wird sie mitgelöscht, sofern sie nicht anderweitig genutzt wird." }
|
||||
],
|
||||
"explanation": "Vor dem Löschen eines Kontos Dateien sichern oder neu zuordnen; verwaiste Dateien zeigen `find / -nouser -o -nogroup`.",
|
||||
"references": ["man 8 userdel"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-007",
|
||||
"objective": "107.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche crontab-Kurzschreibweise führt einen Befehl einmal nach **jedem Systemstart** aus?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`@reboot`", "correct": true, "explanation": "Läuft einmal, wenn der cron-Daemon startet." },
|
||||
{ "id": "b", "text": "`@daily`", "correct": false, "explanation": "Entspricht `0 0 * * *` (täglich um Mitternacht)." },
|
||||
{ "id": "c", "text": "`@boot`", "correct": false, "explanation": "Diese Kurzschreibweise gibt es nicht." },
|
||||
{ "id": "d", "text": "`@startup`", "correct": false, "explanation": "Diese Kurzschreibweise gibt es nicht." },
|
||||
{ "id": "e", "text": "`0 0 * * 0`", "correct": false, "explanation": "Sonntags um Mitternacht (`@weekly`)." }
|
||||
],
|
||||
"explanation": "Kurzschreibweisen: `@reboot`, `@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`.",
|
||||
"references": ["man 5 crontab"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-008",
|
||||
"objective": "107.2",
|
||||
"type": "fill",
|
||||
"difficulty": 2,
|
||||
"question": "Geben Sie die fünf crontab-Zeitfelder ein, mit denen ein Job **alle 15 Minuten** läuft.",
|
||||
"answers": ["*/15 * * * *", "0,15,30,45 * * * *", "0-59/15 * * * *"],
|
||||
"explanation": "`*/15` im Minutenfeld bedeutet „jede 15. Minute“ (0, 15, 30, 45).",
|
||||
"references": ["man 5 crontab"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-009",
|
||||
"objective": "107.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wie löscht man den anstehenden at-Auftrag mit der Nummer 7?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`atrm 7`", "correct": true, "explanation": "`atrm` entfernt at-Aufträge anhand der Nummer aus `atq`." },
|
||||
{ "id": "b", "text": "`atq 7`", "correct": false, "explanation": "`atq` listet nur die Warteschlange." },
|
||||
{ "id": "c", "text": "`crontab -r 7`", "correct": false, "explanation": "`crontab -r` löscht die **gesamte** crontab des Benutzers – Vorsicht!" },
|
||||
{ "id": "d", "text": "`kill 7`", "correct": false, "explanation": "Sendet ein Signal an den Prozess mit PID 7." },
|
||||
{ "id": "e", "text": "`at -l 7`", "correct": false, "explanation": "`at -l` entspricht `atq` und listet Aufträge." }
|
||||
],
|
||||
"explanation": "`at -c 7` zeigt den Inhalt des Auftrags. `at -d 7` ist gleichbedeutend mit `atrm 7`.",
|
||||
"references": ["man 1 at"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-010",
|
||||
"objective": "107.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Ein systemd-Timer soll eine Ausführung **nachholen**, die verpasst wurde, weil der Rechner ausgeschaltet war. Welche Einstellung im `[Timer]`-Abschnitt sorgt dafür?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`Persistent=true`", "correct": true, "explanation": "Der Zeitpunkt der letzten Ausführung wird gespeichert; Verpasstes läuft nach dem Start." },
|
||||
{ "id": "b", "text": "`OnBootSec=0`", "correct": false, "explanation": "Startet nach jedem Boot, unabhängig vom Kalender." },
|
||||
{ "id": "c", "text": "`AccuracySec=1s`", "correct": false, "explanation": "Legt nur die Genauigkeit des Auslösezeitpunkts fest." },
|
||||
{ "id": "d", "text": "`WakeSystem=true`", "correct": false, "explanation": "Weckt das System aus dem Ruhezustand; ein ausgeschaltetes System hilft das nicht." },
|
||||
{ "id": "e", "text": "`RemainAfterElapse=true`", "correct": false, "explanation": "Lässt den Timer nach Ablauf geladen; mit Nachholen hat das nichts zu tun." }
|
||||
],
|
||||
"explanation": "Klassisch erfüllt `anacron` diese Aufgabe für tägliche/wöchentliche cron-Jobs.",
|
||||
"references": ["man 5 systemd.timer"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-011",
|
||||
"objective": "107.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welcher Befehl führt `/usr/local/bin/sync.sh` **einmalig in 30 Minuten** als transiente systemd-Unit aus?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`systemd-run --on-active=30m /usr/local/bin/sync.sh`", "correct": true, "explanation": "`systemd-run` erzeugt Timer und Service vorübergehend; `--on-active` zählt ab jetzt." },
|
||||
{ "id": "b", "text": "`systemd-run --on-calendar=30m /usr/local/bin/sync.sh`", "correct": false, "explanation": "`--on-calendar` erwartet einen Kalenderausdruck wie `*-*-* 02:00`, keine Zeitspanne." },
|
||||
{ "id": "c", "text": "`systemctl start --in 30m /usr/local/bin/sync.sh`", "correct": false, "explanation": "`systemctl start` kennt keine Verzögerung und startet nur Units." },
|
||||
{ "id": "d", "text": "`at --systemd 30m /usr/local/bin/sync.sh`", "correct": false, "explanation": "`at` hat keine solche Option; richtig wäre `echo /usr/local/bin/sync.sh | at now + 30 minutes`." },
|
||||
{ "id": "e", "text": "`timedatectl run 30m /usr/local/bin/sync.sh`", "correct": false, "explanation": "`timedatectl` verwaltet Uhrzeit und Zeitzone." }
|
||||
],
|
||||
"explanation": "Transiente Timer erscheinen in `systemctl list-timers` und verschwinden nach Ausführung.",
|
||||
"references": ["man 1 systemd-run"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-012",
|
||||
"objective": "107.2",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Werte sind gültige `OnCalendar=`-Angaben in einer systemd-Timer-Unit?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`daily`", "correct": true, "explanation": "Kurzform für `*-*-* 00:00:00`." },
|
||||
{ "id": "b", "text": "`Mon *-*-* 02:30:00`", "correct": true, "explanation": "Wochentag, Datum (Jahr-Monat-Tag), Uhrzeit." },
|
||||
{ "id": "c", "text": "`*/15 * * * *`", "correct": false, "explanation": "Das ist crontab-Syntax; systemd schreibt z. B. `*:0/15`." },
|
||||
{ "id": "d", "text": "`every 5 minutes`", "correct": false, "explanation": "Freitext versteht systemd nicht." },
|
||||
{ "id": "e", "text": "`30 2 * * 1`", "correct": false, "explanation": "crontab-Syntax, nicht systemd." }
|
||||
],
|
||||
"explanation": "Prüfen und Vorschau: `systemd-analyze calendar \"Mon *-*-* 02:30:00\"`.",
|
||||
"references": ["man 7 systemd.time"]
|
||||
},
|
||||
{
|
||||
"id": "107.2-013",
|
||||
"objective": "107.2",
|
||||
"type": "fill",
|
||||
"difficulty": 2,
|
||||
"question": "Mit welchem `crontab`-Aufruf zeigt root die crontab des Benutzers `bob` an?",
|
||||
"answers": ["crontab -l -u bob", "crontab -u bob -l"],
|
||||
"explanation": "`-u` wählt den Benutzer; mit `-e` bearbeitet root fremde crontabs.",
|
||||
"references": ["man 1 crontab"]
|
||||
},
|
||||
{
|
||||
"id": "107.3-005",
|
||||
"objective": "107.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl listet alle auf dem System verfügbaren (erzeugten) Locales auf?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`locale -a`", "correct": true, "explanation": "`-a` (all) listet z. B. `C.UTF-8`, `de_DE.utf8`, `en_US.utf8`." },
|
||||
{ "id": "b", "text": "`locale`", "correct": false, "explanation": "Zeigt nur die aktuell wirksamen Einstellungen." },
|
||||
{ "id": "c", "text": "`localectl list-keymaps`", "correct": false, "explanation": "Listet Tastaturbelegungen." },
|
||||
{ "id": "d", "text": "`iconv -l`", "correct": false, "explanation": "Listet Zeichenkodierungen, keine Locales." },
|
||||
{ "id": "e", "text": "`ls /etc/locale`", "correct": false, "explanation": "Kein Standardort für Locales." }
|
||||
],
|
||||
"explanation": "Fehlende Locales erzeugt man unter Debian mit `locale-gen` bzw. `dpkg-reconfigure locales`. Systemweite Vorgabe: `localectl set-locale LANG=de_DE.UTF-8`.",
|
||||
"references": ["man 1 locale"]
|
||||
},
|
||||
{
|
||||
"id": "107.3-006",
|
||||
"objective": "107.3",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl (nur der Name) zeigt die aktuell wirksamen Locale-Einstellungen (`LANG`, `LC_*`) an?",
|
||||
"answers": ["locale"],
|
||||
"explanation": "Werte in Anführungszeichen sind abgeleitet (aus `LANG` bzw. `LC_ALL`), nicht ausdrücklich gesetzt.",
|
||||
"references": ["man 1 locale"]
|
||||
},
|
||||
{
|
||||
"id": "107.3-007",
|
||||
"objective": "107.3",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Was ist `/etc/localtime` auf den meisten aktuellen Linux-Systemen?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Ein symbolischer Link auf eine Zeitzonendatei unter `/usr/share/zoneinfo/`", "correct": true, "explanation": "z. B. `/etc/localtime -> /usr/share/zoneinfo/Europe/Berlin`." },
|
||||
{ "id": "b", "text": "Eine Textdatei mit dem Namen der Zeitzone", "correct": false, "explanation": "Das ist `/etc/timezone` (Debian)." },
|
||||
{ "id": "c", "text": "Die Konfiguration der Hardware-Uhr (UTC oder Ortszeit)", "correct": false, "explanation": "Das steht in `/etc/adjtime`." },
|
||||
{ "id": "d", "text": "Eine Protokolldatei der Zeitsynchronisation", "correct": false, "explanation": "Keine Protokolldatei." },
|
||||
{ "id": "e", "text": "Ein Kernelparameter unter `/proc`", "correct": false, "explanation": "`/etc` liegt auf der Festplatte, nicht im procfs." }
|
||||
],
|
||||
"explanation": "Die Zeitzonendaten (tzdata) liegen binär unter `/usr/share/zoneinfo/`.",
|
||||
"references": ["man 5 localtime"]
|
||||
},
|
||||
{
|
||||
"id": "107.3-008",
|
||||
"objective": "107.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wie zeigt man **einmalig** die aktuelle Uhrzeit in New York an, ohne die Zeitzone des Systems zu ändern?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`TZ=America/New_York date`", "correct": true, "explanation": "`TZ` gilt hier nur für diesen einen Aufruf von `date`." },
|
||||
{ "id": "b", "text": "`timedatectl set-timezone America/New_York`", "correct": false, "explanation": "Ändert die Zeitzone des Systems dauerhaft." },
|
||||
{ "id": "c", "text": "`LC_TIME=America/New_York date`", "correct": false, "explanation": "`LC_TIME` steuert nur das Format, nicht die Zeitzone." },
|
||||
{ "id": "d", "text": "`date -u`", "correct": false, "explanation": "Zeigt UTC an." },
|
||||
{ "id": "e", "text": "`hwclock --localtime`", "correct": false, "explanation": "Betrifft die Interpretation der Hardware-Uhr." }
|
||||
],
|
||||
"explanation": "Gültige Namen liefert `timedatectl list-timezones` oder `tzselect`.",
|
||||
"references": ["man 1 date", "man 3 tzset"]
|
||||
},
|
||||
{
|
||||
"id": "107.3-009",
|
||||
"objective": "107.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Locale-Kategorie bestimmt das **Format von Datum und Uhrzeit**?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`LC_TIME`", "correct": true, "explanation": "z. B. `30.10.2026` bei `de_DE` statt `10/30/2026` bei `en_US`." },
|
||||
{ "id": "b", "text": "`LC_NUMERIC`", "correct": false, "explanation": "Dezimal- und Tausendertrennzeichen." },
|
||||
{ "id": "c", "text": "`LC_COLLATE`", "correct": false, "explanation": "Sortierreihenfolge." },
|
||||
{ "id": "d", "text": "`LC_MESSAGES`", "correct": false, "explanation": "Sprache der Programmmeldungen." },
|
||||
{ "id": "e", "text": "`LC_CTYPE`", "correct": false, "explanation": "Zeichenklassen und Zeichensatz." }
|
||||
],
|
||||
"explanation": "Weitere: `LC_MONETARY` (Währung), `LC_PAPER`, `LC_MEASUREMENT`.",
|
||||
"references": ["man 7 locale"]
|
||||
},
|
||||
{
|
||||
"id": "107.3-010",
|
||||
"objective": "107.3",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Werkzeuge helfen, die **Zeitzone** auszuwählen bzw. einzustellen?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`tzselect`", "correct": true, "explanation": "Interaktive Auswahl; gibt den passenden `TZ`-Wert aus." },
|
||||
{ "id": "b", "text": "`dpkg-reconfigure tzdata`", "correct": true, "explanation": "Debian: setzt `/etc/timezone` und `/etc/localtime`." },
|
||||
{ "id": "c", "text": "`locale-gen`", "correct": false, "explanation": "Erzeugt Locales." },
|
||||
{ "id": "d", "text": "`iconv`", "correct": false, "explanation": "Konvertiert Zeichenkodierungen." },
|
||||
{ "id": "e", "text": "`localectl set-locale`", "correct": false, "explanation": "Setzt die systemweite Locale, nicht die Zeitzone." }
|
||||
],
|
||||
"explanation": "Mit systemd: `timedatectl set-timezone <Zone>`.",
|
||||
"references": ["man 8 tzselect"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,321 @@
|
||||
{
|
||||
"$schema": "../schema/questions.schema.json",
|
||||
"format": "lpic-sim-questions",
|
||||
"meta": {
|
||||
"file": "questions_108_set2.json",
|
||||
"brief": "Zweiter Fragensatz 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 (30.10.2026)"
|
||||
},
|
||||
"exam": "lpic1-102",
|
||||
"questions": [
|
||||
{
|
||||
"id": "108.1-005",
|
||||
"objective": "108.1",
|
||||
"type": "fill",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Option von `hwclock` überträgt die Zeit der Hardware-Uhr in die Systemzeit? (nur die Option)",
|
||||
"answers": ["--hctosys", "-s"],
|
||||
"explanation": "hardware clock to system: wird typischerweise beim Start ausgeführt. Gegenrichtung: `--systohc` (`-w`).",
|
||||
"references": ["man 8 hwclock"]
|
||||
},
|
||||
{
|
||||
"id": "108.1-006",
|
||||
"objective": "108.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl gibt das heutige Datum im Format `2026-10-30` aus?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`date +%F`", "correct": true, "explanation": "`%F` entspricht `%Y-%m-%d`." },
|
||||
{ "id": "b", "text": "`date +%D`", "correct": false, "explanation": "`%D` ergibt `10/30/26`." },
|
||||
{ "id": "c", "text": "`date +%T`", "correct": false, "explanation": "`%T` ist die Uhrzeit `%H:%M:%S`." },
|
||||
{ "id": "d", "text": "`date +%d.%m.%Y`", "correct": false, "explanation": "Ergibt `30.10.2026`." },
|
||||
{ "id": "e", "text": "`date -u`", "correct": false, "explanation": "Zeigt Datum und Uhrzeit in UTC im Standardformat." }
|
||||
],
|
||||
"explanation": "Typisch für Dateinamen: `backup_$(date +%F).tar.gz`. Uhrzeit stellen: `date -s` bzw. `timedatectl set-time`.",
|
||||
"references": ["man 1 date"]
|
||||
},
|
||||
{
|
||||
"id": "108.1-007",
|
||||
"objective": "108.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Mit welcher Zeile trägt man in der chrony-Konfiguration einen NTP-**Pool** als Zeitquelle ein?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`pool 2.debian.pool.ntp.org iburst`", "correct": true, "explanation": "`pool` löst den Namen in mehrere Server auf; `iburst` beschleunigt die erste Synchronisation." },
|
||||
{ "id": "b", "text": "`NTP=2.debian.pool.ntp.org`", "correct": false, "explanation": "Das ist die Syntax von `/etc/systemd/timesyncd.conf`." },
|
||||
{ "id": "c", "text": "`ntpserver = 2.debian.pool.ntp.org`", "correct": false, "explanation": "Keine gültige chrony-Direktive." },
|
||||
{ "id": "d", "text": "`nameserver 2.debian.pool.ntp.org`", "correct": false, "explanation": "Syntax von `/etc/resolv.conf`." },
|
||||
{ "id": "e", "text": "`server: 2.debian.pool.ntp.org`", "correct": false, "explanation": "chrony nutzt keinen Doppelpunkt; einzelne Server: `server <name> iburst`." }
|
||||
],
|
||||
"explanation": "Dieselbe Syntax (`server`, `pool`) verwendet auch der klassische ntpd in `/etc/ntp.conf`.",
|
||||
"references": ["man 5 chrony.conf"]
|
||||
},
|
||||
{
|
||||
"id": "108.1-008",
|
||||
"objective": "108.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "In welcher Datei konfiguriert man die NTP-Server für **systemd-timesyncd**?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`/etc/systemd/timesyncd.conf`", "correct": true, "explanation": "Abschnitt `[Time]`, z. B. `NTP=` und `FallbackNTP=`." },
|
||||
{ "id": "b", "text": "`/etc/chrony/chrony.conf`", "correct": false, "explanation": "Konfiguration von chrony." },
|
||||
{ "id": "c", "text": "`/etc/ntp.conf`", "correct": false, "explanation": "Konfiguration des klassischen ntpd." },
|
||||
{ "id": "d", "text": "`/etc/adjtime`", "correct": false, "explanation": "Hält Drift und Modus (UTC/Ortszeit) der Hardware-Uhr." },
|
||||
{ "id": "e", "text": "`/etc/systemd/journald.conf`", "correct": false, "explanation": "Konfiguration des Journals." }
|
||||
],
|
||||
"explanation": "systemd-timesyncd ist ein reiner SNTP-Client; als Server für andere Rechner taugt er nicht.",
|
||||
"references": ["man 5 timesyncd.conf"]
|
||||
},
|
||||
{
|
||||
"id": "108.1-009",
|
||||
"objective": "108.1",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Mit welchen Befehlen prüft man, ob die Systemuhr synchronisiert ist bzw. wie groß die Abweichung ist?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`timedatectl`", "correct": true, "explanation": "Zeigt u. a. `System clock synchronized: yes/no` und `NTP service`." },
|
||||
{ "id": "b", "text": "`chronyc tracking`", "correct": true, "explanation": "Zeigt Referenzquelle, Stratum und aktuelle Abweichung (System time offset)." },
|
||||
{ "id": "c", "text": "`hwclock --systohc`", "correct": false, "explanation": "Schreibt die Systemzeit in die Hardware-Uhr, prüft nichts." },
|
||||
{ "id": "d", "text": "`date -s \"12:00\"`", "correct": false, "explanation": "Stellt die Uhr manuell." },
|
||||
{ "id": "e", "text": "`ntpdate pool.ntp.org`", "correct": false, "explanation": "Stellt die Uhr einmalig (veraltet); `ntpdate -q` würde nur abfragen." }
|
||||
],
|
||||
"explanation": "Beim klassischen ntpd zeigt `ntpq -p` die Peers mit Offset und Jitter.",
|
||||
"references": ["man 1 timedatectl", "man 1 chronyc"]
|
||||
},
|
||||
{
|
||||
"id": "108.2-007",
|
||||
"objective": "108.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wie zeigt `journalctl` nur Meldungen mit Priorität **err und höher** an?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`journalctl -p err`", "correct": true, "explanation": "`-p` filtert nach Priorität; ein einzelner Wert schließt alle schwerwiegenderen ein." },
|
||||
{ "id": "b", "text": "`journalctl -u err`", "correct": false, "explanation": "`-u` filtert nach Unit." },
|
||||
{ "id": "c", "text": "`journalctl -t err`", "correct": false, "explanation": "`-t` filtert nach Syslog-Kennung (Identifier)." },
|
||||
{ "id": "d", "text": "`journalctl -k err`", "correct": false, "explanation": "`-k` zeigt Kernel-Meldungen." },
|
||||
{ "id": "e", "text": "`journalctl --grep err`", "correct": false, "explanation": "Durchsucht den Meldungstext nach „err“, unabhängig von der Priorität." }
|
||||
],
|
||||
"explanation": "Prioritäten als Namen oder Zahlen 0 (emerg) bis 7 (debug); Bereich z. B. `-p warning..err`.",
|
||||
"references": ["man 1 journalctl"]
|
||||
},
|
||||
{
|
||||
"id": "108.2-008",
|
||||
"objective": "108.2",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Welche `journalctl`-Option zeigt nur Meldungen des **aktuellen Systemstarts**? (nur die Option)",
|
||||
"answers": ["-b", "--boot", "-b 0"],
|
||||
"explanation": "`-b -1` zeigt den vorherigen Start (persistentes Journal nötig); `--list-boots` listet alle.",
|
||||
"references": ["man 1 journalctl"]
|
||||
},
|
||||
{
|
||||
"id": "108.2-009",
|
||||
"objective": "108.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welcher Aufruf zeigt Journal-Meldungen vom 30.10.2026 zwischen 08:00 und 09:00 Uhr?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`journalctl --since \"2026-10-30 08:00\" --until \"2026-10-30 09:00\"`", "correct": true, "explanation": "`--since`/`--until` (`-S`/`-U`) begrenzen den Zeitraum." },
|
||||
{ "id": "b", "text": "`journalctl --from 08:00 --to 09:00`", "correct": false, "explanation": "Diese Optionen gibt es nicht." },
|
||||
{ "id": "c", "text": "`journalctl -b 2026-10-30 08:00-09:00`", "correct": false, "explanation": "`-b` erwartet eine Boot-ID oder einen Index." },
|
||||
{ "id": "d", "text": "`journalctl -p 08:00..09:00`", "correct": false, "explanation": "`-p` filtert nach Priorität." },
|
||||
{ "id": "e", "text": "`journalctl --date 30.10.2026`", "correct": false, "explanation": "Diese Option gibt es nicht." }
|
||||
],
|
||||
"explanation": "Auch relative Angaben sind möglich: `--since \"1 hour ago\"`, `--since yesterday`.",
|
||||
"references": ["man 1 journalctl"]
|
||||
},
|
||||
{
|
||||
"id": "108.2-010",
|
||||
"objective": "108.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Was bewirkt die rsyslog-Regel `*.* @@log.example.org:514`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Alle Meldungen werden per **TCP** an `log.example.org` weitergeleitet.", "correct": true, "explanation": "`@@` steht für TCP." },
|
||||
{ "id": "b", "text": "Alle Meldungen werden per UDP an `log.example.org` weitergeleitet.", "correct": false, "explanation": "UDP wäre ein einzelnes `@`." },
|
||||
{ "id": "c", "text": "rsyslog empfängt Meldungen von `log.example.org`.", "correct": false, "explanation": "Empfang wird über Eingabemodule (`imtcp`/`imudp`) konfiguriert." },
|
||||
{ "id": "d", "text": "Nur Fehler werden weitergeleitet.", "correct": false, "explanation": "`*.*` bedeutet alle Facilities und Prioritäten." },
|
||||
{ "id": "e", "text": "Die Meldungen werden in eine Datei namens `log.example.org` geschrieben.", "correct": false, "explanation": "Dateiziele beginnen mit `/`." }
|
||||
],
|
||||
"explanation": "Port 514 ist der Standard für syslog. Zentrale Protokollierung erschwert Angreifern das Verwischen von Spuren.",
|
||||
"references": ["man 5 rsyslog.conf"]
|
||||
},
|
||||
{
|
||||
"id": "108.2-011",
|
||||
"objective": "108.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche syslog-Facilities sind für **eigene Anwendungen** frei verwendbar?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`local0` bis `local7`", "correct": true, "explanation": "Reserviert für lokale bzw. eigene Zwecke." },
|
||||
{ "id": "b", "text": "`kern`", "correct": false, "explanation": "Für Kernel-Meldungen reserviert." },
|
||||
{ "id": "c", "text": "`authpriv`", "correct": false, "explanation": "Für vertrauliche Authentifizierungsmeldungen." },
|
||||
{ "id": "d", "text": "`mail`", "correct": false, "explanation": "Für das Mailsystem." },
|
||||
{ "id": "e", "text": "`cron`", "correct": false, "explanation": "Für den cron-Daemon." }
|
||||
],
|
||||
"explanation": "Beispiel: `logger -p local3.info \"Backup ok\"` und in rsyslog `local3.* /var/log/backup.log`.",
|
||||
"references": ["man 3 syslog"]
|
||||
},
|
||||
{
|
||||
"id": "108.2-012",
|
||||
"objective": "108.2",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zur Verwaltung des systemd-Journals treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`journalctl --vacuum-time=2weeks` löscht archivierte Journal-Dateien, die älter als zwei Wochen sind.", "correct": true, "explanation": "Ebenso `--vacuum-size=` und `--vacuum-files=`." },
|
||||
{ "id": "b", "text": "`journalctl --disk-usage` zeigt, wie viel Platz das Journal belegt.", "correct": true, "explanation": "Summe aus aktiven und archivierten Dateien." },
|
||||
{ "id": "c", "text": "`journalctl --rotate` löscht alle Meldungen.", "correct": false, "explanation": "Rotiert nur: Die aktiven Dateien werden archiviert, neue begonnen." },
|
||||
{ "id": "d", "text": "`journalctl -r` zeigt das Journal eines entfernten Rechners.", "correct": false, "explanation": "`-r` (reverse) zeigt die neuesten Meldungen zuerst." },
|
||||
{ "id": "e", "text": "`systemd-cat` liest das Journal und gibt es aus.", "correct": false, "explanation": "`systemd-cat` schreibt die Ausgabe eines Befehls **ins** Journal." }
|
||||
],
|
||||
"explanation": "Dauerhafte Grenzen: `SystemMaxUse=` und `MaxRetentionSec=` in `journald.conf`.",
|
||||
"references": ["man 1 journalctl", "man 1 systemd-cat"]
|
||||
},
|
||||
{
|
||||
"id": "108.2-013",
|
||||
"objective": "108.2",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welchem `journalctl`-Aufruf (Befehl und Option) zeigt man nur die **Kernel-Meldungen** aus dem Journal?",
|
||||
"answers": ["journalctl -k", "journalctl --dmesg"],
|
||||
"explanation": "Entspricht inhaltlich `dmesg`, aber mit Zeitstempeln und Filtern des Journals; impliziert den aktuellen Boot.",
|
||||
"references": ["man 1 journalctl"]
|
||||
},
|
||||
{
|
||||
"id": "108.3-005",
|
||||
"objective": "108.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Über welchen Port liefern MTAs E-Mails per SMTP **untereinander** aus?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "25", "correct": true, "explanation": "Port 25/tcp: SMTP zwischen Mailservern." },
|
||||
{ "id": "b", "text": "587", "correct": false, "explanation": "Submission: Einlieferung durch Mailprogramme (MUA) mit Authentifizierung." },
|
||||
{ "id": "c", "text": "110", "correct": false, "explanation": "POP3 zum Abholen von Mails." },
|
||||
{ "id": "d", "text": "143", "correct": false, "explanation": "IMAP zum Abholen bzw. Verwalten von Mails." },
|
||||
{ "id": "e", "text": "993", "correct": false, "explanation": "IMAP über TLS." }
|
||||
],
|
||||
"explanation": "Zusätzlich 465 (SMTPS, Submission über TLS). Viele Provider sperren ausgehenden Port 25 für Endkunden.",
|
||||
"references": ["man 5 services"]
|
||||
},
|
||||
{
|
||||
"id": "108.3-006",
|
||||
"objective": "108.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wie verschickt man auf der Befehlszeile den Inhalt von `bericht.txt` mit dem Betreff „Bericht“ an `anna@example.org`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`mail -s \"Bericht\" anna@example.org < bericht.txt`", "correct": true, "explanation": "`mail` liest den Text von stdin; `-s` setzt den Betreff." },
|
||||
{ "id": "b", "text": "`mailq -s \"Bericht\" anna@example.org < bericht.txt`", "correct": false, "explanation": "`mailq` zeigt nur die Warteschlange." },
|
||||
{ "id": "c", "text": "`newaliases -s \"Bericht\" anna@example.org`", "correct": false, "explanation": "`newaliases` baut die Alias-Datenbank neu." },
|
||||
{ "id": "d", "text": "`smtp anna@example.org bericht.txt`", "correct": false, "explanation": "Einen solchen Befehl gibt es standardmäßig nicht." },
|
||||
{ "id": "e", "text": "`cat bericht.txt > anna@example.org`", "correct": false, "explanation": "Schreibt in eine **Datei** namens `anna@example.org`." }
|
||||
],
|
||||
"explanation": "`mail` übergibt die Nachricht an den lokalen MTA (über dessen `sendmail`-Schnittstelle).",
|
||||
"references": ["man 1 mail"]
|
||||
},
|
||||
{
|
||||
"id": "108.3-007",
|
||||
"objective": "108.3",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "In welcher Datei (vollständiger Pfad) stehen die systemweiten E-Mail-Aliase, z. B. `postmaster: root`?",
|
||||
"answers": ["/etc/aliases"],
|
||||
"explanation": "Nach Änderungen `newaliases` ausführen. Bei manchen Systemen liegt sie unter `/etc/mail/aliases`.",
|
||||
"references": ["man 5 aliases"]
|
||||
},
|
||||
{
|
||||
"id": "108.3-008",
|
||||
"objective": "108.3",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Warum bringen Postfix und Exim einen Befehl `sendmail` mit, obwohl sie nicht Sendmail sind?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Aus Kompatibilität: Viele Programme übergeben Mails an `/usr/sbin/sendmail`.", "correct": true, "explanation": "Die Schnittstelle ist ein De-facto-Standard; cron, mail und Skripte nutzen sie." },
|
||||
{ "id": "b", "text": "Weil Postfix intern den Sendmail-Daemon startet.", "correct": false, "explanation": "Postfix ist eine eigenständige Implementierung." },
|
||||
{ "id": "c", "text": "Damit sie Mails per IMAP abholen können.", "correct": false, "explanation": "Abholen ist Aufgabe von IMAP-/POP3-Servern und Clients." },
|
||||
{ "id": "d", "text": "Weil `sendmail` die Konfigurationsdatei `/etc/aliases` ersetzt.", "correct": false, "explanation": "`/etc/aliases` bleibt in Gebrauch." },
|
||||
{ "id": "e", "text": "Es ist nur ein Symlink auf `mailq` ohne eigene Funktion.", "correct": false, "explanation": "Umgekehrt: `mailq` und `newaliases` sind oft Links auf `sendmail`." }
|
||||
],
|
||||
"explanation": "`sendmail -bp` = `mailq`, `sendmail -bi` = `newaliases`, `sendmail -q` arbeitet die Warteschlange ab.",
|
||||
"references": ["man 1 sendmail"]
|
||||
},
|
||||
{
|
||||
"id": "108.3-009",
|
||||
"objective": "108.3",
|
||||
"type": "multi",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Aussagen zu MTA, MDA und MUA treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Thunderbird ist ein Mail User Agent (MUA).", "correct": true, "explanation": "Programm zum Lesen und Schreiben von Mails." },
|
||||
{ "id": "b", "text": "Ein MTA überträgt Mails per SMTP zwischen Servern.", "correct": true, "explanation": "z. B. Postfix, Exim, Sendmail." },
|
||||
{ "id": "c", "text": "Dovecot ist ein MTA.", "correct": false, "explanation": "Dovecot ist ein IMAP-/POP3-Server (mit eigenem LDA)." },
|
||||
{ "id": "d", "text": "Ein MUA stellt Mails standardmäßig direkt an fremde Mailserver zu.", "correct": false, "explanation": "Ein MUA übergibt an einen MTA (Submission), der zustellt." },
|
||||
{ "id": "e", "text": "`mailq` verschickt Mails sofort.", "correct": false, "explanation": "`mailq` zeigt nur die Warteschlange." }
|
||||
],
|
||||
"explanation": "Kette: MUA → MTA (Absender) → MTA (Empfänger) → MDA (lokale Zustellung) → Postfach → MUA.",
|
||||
"references": ["LPI 102-500 Objective 108.3"]
|
||||
},
|
||||
{
|
||||
"id": "108.4-004",
|
||||
"objective": "108.4",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Wie legt ein Benutzer den Drucker `buero` als seinen **Standarddrucker** fest?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`lpoptions -d buero`", "correct": true, "explanation": "Schreibt den Standarddrucker in `~/.cups/lpoptions` (als root systemweit)." },
|
||||
{ "id": "b", "text": "`lp -d buero`", "correct": false, "explanation": "Druckt stdin einmalig auf `buero`, ändert den Standard nicht." },
|
||||
{ "id": "c", "text": "`lpq -d buero`", "correct": false, "explanation": "`lpq` zeigt die Warteschlange." },
|
||||
{ "id": "d", "text": "`cupsenable -d buero`", "correct": false, "explanation": "`cupsenable` aktiviert einen Drucker." },
|
||||
{ "id": "e", "text": "`lprm -d buero`", "correct": false, "explanation": "`lprm` entfernt Aufträge." }
|
||||
],
|
||||
"explanation": "Systemweit als Administrator auch `lpadmin -d buero`. Die Variable `PRINTER` überschreibt den Standard für eine Sitzung.",
|
||||
"references": ["man 1 lpoptions"]
|
||||
},
|
||||
{
|
||||
"id": "108.4-005",
|
||||
"objective": "108.4",
|
||||
"type": "fill",
|
||||
"difficulty": 2,
|
||||
"question": "Welcher System-V-Druckbefehl (nur der Name) entfernt Druckaufträge – das Gegenstück zu `lprm`?",
|
||||
"answers": ["cancel"],
|
||||
"explanation": "`cancel <auftrag>` bzw. `cancel -a <drucker>` für alle Aufträge eines Druckers.",
|
||||
"references": ["man 1 cancel"]
|
||||
},
|
||||
{
|
||||
"id": "108.4-006",
|
||||
"objective": "108.4",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl zeigt alle Drucker mit ihrem Status und den Standarddrucker an?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`lpstat -p -d`", "correct": true, "explanation": "`-p` Druckerstatus, `-d` Standarddrucker; `lpstat -t` zeigt alles." },
|
||||
{ "id": "b", "text": "`lpq -a`", "correct": false, "explanation": "Zeigt die Aufträge aller Warteschlangen." },
|
||||
{ "id": "c", "text": "`lpinfo -v`", "correct": false, "explanation": "Listet verfügbare Geräte bzw. Backends für neue Drucker." },
|
||||
{ "id": "d", "text": "`cupsctl`", "correct": false, "explanation": "Zeigt bzw. ändert Einstellungen des CUPS-Servers." },
|
||||
{ "id": "e", "text": "`lpadmin -l`", "correct": false, "explanation": "`lpadmin` richtet Drucker ein; `-l` listet nichts." }
|
||||
],
|
||||
"explanation": "Die Weboberfläche unter `http://localhost:631` zeigt dieselben Informationen.",
|
||||
"references": ["man 1 lpstat"]
|
||||
},
|
||||
{
|
||||
"id": "108.4-007",
|
||||
"objective": "108.4",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Druckaufträge für `buero` landen in der Warteschlange, werden aber nicht gedruckt. Welche Befehle helfen bei Diagnose bzw. Behebung?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`lpstat -t`", "correct": true, "explanation": "Zeigt Status aller Drucker (z. B. „disabled“) und Aufträge." },
|
||||
{ "id": "b", "text": "`cupsenable buero`", "correct": true, "explanation": "Aktiviert einen angehaltenen Drucker wieder; danach wird gedruckt." },
|
||||
{ "id": "c", "text": "`cupsreject buero`", "correct": false, "explanation": "Lässt den Drucker keine **neuen** Aufträge mehr annehmen." },
|
||||
{ "id": "d", "text": "`lpadmin -x buero`", "correct": false, "explanation": "Löscht den Drucker." },
|
||||
{ "id": "e", "text": "`lprm -`", "correct": false, "explanation": "Löscht alle eigenen Aufträge – behebt die Ursache nicht." }
|
||||
],
|
||||
"explanation": "CUPS deaktiviert einen Drucker oft selbst nach Fehlern. Details stehen in `/var/log/cups/error_log`.",
|
||||
"references": ["man 8 cupsenable", "man 1 lpstat"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,391 @@
|
||||
{
|
||||
"$schema": "../schema/questions.schema.json",
|
||||
"format": "lpic-sim-questions",
|
||||
"meta": {
|
||||
"file": "questions_109_set2.json",
|
||||
"brief": "Zweiter Fragensatz 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 (30.10.2026)"
|
||||
},
|
||||
"exam": "lpic1-102",
|
||||
"questions": [
|
||||
{
|
||||
"id": "109.1-007",
|
||||
"objective": "109.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Wie lautet die Broadcast-Adresse des Netzes `192.0.2.64/26`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`192.0.2.127`", "correct": true, "explanation": "/26 = Blöcke zu 64 Adressen: .64 bis .127; die letzte ist Broadcast." },
|
||||
{ "id": "b", "text": "`192.0.2.63`", "correct": false, "explanation": "Broadcast des vorherigen Netzes `192.0.2.0/26`." },
|
||||
{ "id": "c", "text": "`192.0.2.128`", "correct": false, "explanation": "Netzadresse des nächsten Blocks `192.0.2.128/26`." },
|
||||
{ "id": "d", "text": "`192.0.2.255`", "correct": false, "explanation": "Broadcast eines `/24`." },
|
||||
{ "id": "e", "text": "`192.0.2.64`", "correct": false, "explanation": "Das ist die Netzadresse." }
|
||||
],
|
||||
"explanation": "Rechenweg: Blockgröße = 256 − 192 = 64. Netz = Vielfaches von 64, Broadcast = Netz + 63.",
|
||||
"references": ["RFC 950"]
|
||||
},
|
||||
{
|
||||
"id": "109.1-008",
|
||||
"objective": "109.1",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Welchen Port verwenden DNS-Anfragen standardmäßig? (nur die Zahl)",
|
||||
"answers": ["53"],
|
||||
"explanation": "Normale Anfragen über UDP 53; große Antworten und Zonentransfers über TCP 53.",
|
||||
"references": ["man 5 services"]
|
||||
},
|
||||
{
|
||||
"id": "109.1-009",
|
||||
"objective": "109.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Aussage über UDP trifft zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "UDP ist verbindungslos und garantiert weder Zustellung noch Reihenfolge.", "correct": true, "explanation": "Geringer Overhead; Zuverlässigkeit muss die Anwendung selbst regeln." },
|
||||
{ "id": "b", "text": "UDP baut Verbindungen mit einem Drei-Wege-Handshake auf.", "correct": false, "explanation": "Das ist TCP (SYN, SYN-ACK, ACK)." },
|
||||
{ "id": "c", "text": "UDP sorgt für die richtige Reihenfolge der Pakete.", "correct": false, "explanation": "Das leistet TCP über Sequenznummern." },
|
||||
{ "id": "d", "text": "UDP funktioniert nur mit IPv6.", "correct": false, "explanation": "UDP läuft über IPv4 und IPv6." },
|
||||
{ "id": "e", "text": "`ping` verwendet UDP.", "correct": false, "explanation": "`ping` verwendet ICMP." }
|
||||
],
|
||||
"explanation": "Typische UDP-Dienste: DNS, NTP, DHCP, syslog, SNMP.",
|
||||
"references": ["RFC 768"]
|
||||
},
|
||||
{
|
||||
"id": "109.1-010",
|
||||
"objective": "109.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Schreibweise ist die korrekte Kurzform von `2001:0db8:0000:0000:0000:0000:0000:0001`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`2001:db8::1`", "correct": true, "explanation": "Führende Nullen je Gruppe entfallen, die längste Nullfolge wird einmal durch `::` ersetzt." },
|
||||
{ "id": "b", "text": "`2001:db8:1`", "correct": false, "explanation": "Ohne `::` fehlen fünf Gruppen – die Adresse wäre unvollständig." },
|
||||
{ "id": "c", "text": "`2001::db8::1`", "correct": false, "explanation": "`::` darf nur einmal vorkommen." },
|
||||
{ "id": "d", "text": "`2001:db8:0:1`", "correct": false, "explanation": "Nur vier Gruppen, ohne `::` – ungültig." },
|
||||
{ "id": "e", "text": "`21:db8::1`", "correct": false, "explanation": "Nur **führende** Nullen dürfen entfallen; in `2001` sind keine." }
|
||||
],
|
||||
"explanation": "`2001:db8::/32` ist für Dokumentation reserviert – wie `192.0.2.0/24` bei IPv4.",
|
||||
"references": ["RFC 5952"]
|
||||
},
|
||||
{
|
||||
"id": "109.1-011",
|
||||
"objective": "109.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welches IPv6-Präfix ist für **Unique Local Addresses** reserviert (vergleichbar mit privaten IPv4-Netzen)?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`fc00::/7`", "correct": true, "explanation": "In der Praxis `fd00::/8` mit zufälliger 40-Bit-Global-ID." },
|
||||
{ "id": "b", "text": "`fe80::/10`", "correct": false, "explanation": "Link-Local – nur auf dem eigenen Segment gültig." },
|
||||
{ "id": "c", "text": "`2000::/3`", "correct": false, "explanation": "Global Unicast (öffentlich routbar)." },
|
||||
{ "id": "d", "text": "`ff00::/8`", "correct": false, "explanation": "Multicast." },
|
||||
{ "id": "e", "text": "`::1/128`", "correct": false, "explanation": "Loopback." }
|
||||
],
|
||||
"explanation": "ULA werden im Internet nicht geroutet, eignen sich aber für interne Netze.",
|
||||
"references": ["RFC 4193"]
|
||||
},
|
||||
{
|
||||
"id": "109.1-012",
|
||||
"objective": "109.1",
|
||||
"type": "multi",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Protokolle arbeiten auf der **Transportschicht**?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "TCP", "correct": true, "explanation": "Verbindungsorientiert, zuverlässig." },
|
||||
{ "id": "b", "text": "UDP", "correct": true, "explanation": "Verbindungslos." },
|
||||
{ "id": "c", "text": "ICMP", "correct": false, "explanation": "Gehört zur Vermittlungsschicht (IP)." },
|
||||
{ "id": "d", "text": "IP", "correct": false, "explanation": "Vermittlungsschicht." },
|
||||
{ "id": "e", "text": "ARP", "correct": false, "explanation": "Verbindet Sicherungs- und Vermittlungsschicht (IP → MAC)." }
|
||||
],
|
||||
"explanation": "Ports gibt es nur auf der Transportschicht – deshalb haben ICMP-Nachrichten keine Portnummer.",
|
||||
"references": ["RFC 1122"]
|
||||
},
|
||||
{
|
||||
"id": "109.1-013",
|
||||
"objective": "109.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Liegen die Adressen `192.0.2.10/26` und `192.0.2.70/26` im selben Subnetz?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Nein – `192.0.2.10` liegt in `192.0.2.0/26`, `192.0.2.70` in `192.0.2.64/26`.", "correct": true, "explanation": "/26 teilt das /24 in Blöcke .0–.63, .64–.127, .128–.191, .192–.255." },
|
||||
{ "id": "b", "text": "Ja – beide liegen in `192.0.2.0/26`.", "correct": false, "explanation": "`192.0.2.0/26` reicht nur bis .63." },
|
||||
{ "id": "c", "text": "Ja – ein /26 umfasst .0 bis .127.", "correct": false, "explanation": "Das wäre ein /25." },
|
||||
{ "id": "d", "text": "Nein – weil `192.0.2.70` eine Broadcast-Adresse ist.", "correct": false, "explanation": "Broadcast des Blocks ist .127; .70 ist eine normale Host-Adresse." },
|
||||
{ "id": "e", "text": "Das lässt sich ohne Angabe des Gateways nicht bestimmen.", "correct": false, "explanation": "Adresse und Präfix genügen." }
|
||||
],
|
||||
"explanation": "Hosts in verschiedenen Subnetzen erreichen sich nur über einen Router.",
|
||||
"references": ["RFC 950"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-007",
|
||||
"objective": "109.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl zeigt den Status aller Netzwerkgeräte, die NetworkManager verwaltet?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`nmcli device status`", "correct": true, "explanation": "Listet Gerät, Typ, Zustand (connected, disconnected, unmanaged) und Verbindung." },
|
||||
{ "id": "b", "text": "`nmcli general hostname`", "correct": false, "explanation": "Zeigt bzw. setzt den Hostnamen." },
|
||||
{ "id": "c", "text": "`nmcli connection reload`", "correct": false, "explanation": "Liest Verbindungsdateien neu ein." },
|
||||
{ "id": "d", "text": "`ip route`", "correct": false, "explanation": "Zeigt die Routingtabelle des Kernels, nicht den NetworkManager-Status." },
|
||||
{ "id": "e", "text": "`networkctl reload`", "correct": false, "explanation": "Gehört zu systemd-networkd." }
|
||||
],
|
||||
"explanation": "Verbindungen (Profile): `nmcli connection show`; aktivieren mit `nmcli connection up <name>`.",
|
||||
"references": ["man 1 nmcli"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-008",
|
||||
"objective": "109.2",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welchem Befehl (mit Argument) aktiviert man unter ifupdown die Schnittstelle `eth0` gemäß `/etc/network/interfaces`?",
|
||||
"answers": ["ifup eth0"],
|
||||
"explanation": "Gegenstück: `ifdown eth0`. Hinweis: ifupdown soll laut LPI künftig aus den Objectives entfallen.",
|
||||
"references": ["man 8 ifup"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-009",
|
||||
"objective": "109.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Wo und mit welcher Dateiendung legt man eine Schnittstellenkonfiguration für **systemd-networkd** ab?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`/etc/systemd/network/10-eth0.network`", "correct": true, "explanation": "Abschnitte `[Match]` (z. B. `Name=eth0`) und `[Network]` (`Address=`, `Gateway=`, `DNS=` oder `DHCP=yes`)." },
|
||||
{ "id": "b", "text": "`/etc/network/interfaces.d/eth0.conf`", "correct": false, "explanation": "Gehört zu ifupdown." },
|
||||
{ "id": "c", "text": "`/etc/NetworkManager/system-connections/eth0.nmconnection`", "correct": false, "explanation": "Verbindungsprofil von NetworkManager." },
|
||||
{ "id": "d", "text": "`/etc/sysconfig/network-scripts/ifcfg-eth0`", "correct": false, "explanation": "Klassischer Ort der Red-Hat-Familie." },
|
||||
{ "id": "e", "text": "`/etc/systemd/networkd.conf.d/eth0.service`", "correct": false, "explanation": "`.service`-Dateien sind Dienst-Units." }
|
||||
],
|
||||
"explanation": "Status bei networkd: `networkctl list`, `networkctl status eth0`.",
|
||||
"references": ["man 5 systemd.network"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-010",
|
||||
"objective": "109.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wie schaltet man die Schnittstelle `eth0` mit dem `ip`-Werkzeug ab?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ip link set eth0 down`", "correct": true, "explanation": "`ip link set <dev> up|down` setzt den administrativen Zustand." },
|
||||
{ "id": "b", "text": "`ip addr del eth0`", "correct": false, "explanation": "`ip addr del` erwartet eine Adresse und entfernt nur diese." },
|
||||
{ "id": "c", "text": "`ip link eth0 off`", "correct": false, "explanation": "Falsche Syntax (fehlendes `set`, `off` statt `down`)." },
|
||||
{ "id": "d", "text": "`ip route del eth0`", "correct": false, "explanation": "Entfernt Routen, nicht die Schnittstelle." },
|
||||
{ "id": "e", "text": "`ifconfig eth0 off`", "correct": false, "explanation": "Bei ifconfig hieße es `ifconfig eth0 down`." }
|
||||
],
|
||||
"explanation": "Die Änderung ist nicht dauerhaft; Netzwerkdienste können die Schnittstelle wieder aktivieren.",
|
||||
"references": ["man 8 ip-link"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-011",
|
||||
"objective": "109.2",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zu Hostnamen treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`hostname -f` zeigt den vollqualifizierten Namen (FQDN).", "correct": true, "explanation": "Ermittelt über die Namensauflösung, z. B. `web01.example.org`." },
|
||||
{ "id": "b", "text": "`hostnamectl` ohne Argumente zeigt u. a. den statischen Hostnamen, Betriebssystem und Kernel.", "correct": true, "explanation": "Entspricht `hostnamectl status`." },
|
||||
{ "id": "c", "text": "`/etc/hostname` enthält die IP-Adresse des Rechners.", "correct": false, "explanation": "Sie enthält nur den Namen." },
|
||||
{ "id": "d", "text": "Ein mit `hostname web02` gesetzter Name bleibt nach dem Neustart erhalten.", "correct": false, "explanation": "Nur bis zum Neustart; dauerhaft mit `hostnamectl set-hostname`." },
|
||||
{ "id": "e", "text": "Ein Eintrag in `/etc/hosts` schaltet DNS für alle Namen ab.", "correct": false, "explanation": "`/etc/hosts` ergänzt nur einzelne Namen; die Reihenfolge regelt `nsswitch.conf`." }
|
||||
],
|
||||
"explanation": "systemd unterscheidet statischen, transienten (z. B. per DHCP) und „pretty“ Hostnamen.",
|
||||
"references": ["man 1 hostname", "man 1 hostnamectl"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-012",
|
||||
"objective": "109.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welches Programm ist ein **DHCP-Client**?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`dhclient`", "correct": true, "explanation": "Fordert Adresse, Gateway und DNS-Server beim DHCP-Server an." },
|
||||
{ "id": "b", "text": "`dhcpd`", "correct": false, "explanation": "Der ISC-DHCP-**Server**." },
|
||||
{ "id": "c", "text": "`named`", "correct": false, "explanation": "DNS-Server (BIND)." },
|
||||
{ "id": "d", "text": "`ntpd`", "correct": false, "explanation": "NTP-Daemon." },
|
||||
{ "id": "e", "text": "`sshd`", "correct": false, "explanation": "SSH-Server." }
|
||||
],
|
||||
"explanation": "NetworkManager und systemd-networkd bringen eigene DHCP-Clients mit.",
|
||||
"references": ["man 8 dhclient"]
|
||||
},
|
||||
{
|
||||
"id": "109.2-013",
|
||||
"objective": "109.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Wie verbindet man sich mit NetworkManager auf der Befehlszeile mit dem WLAN `Labor`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`nmcli device wifi connect Labor password \"<passphrase>\"`", "correct": true, "explanation": "Legt ein Verbindungsprofil an und aktiviert es; `nmcli device wifi list` zeigt verfügbare Netze." },
|
||||
{ "id": "b", "text": "`nmcli wifi join Labor`", "correct": false, "explanation": "Einen Unterbefehl `wifi join` gibt es nicht." },
|
||||
{ "id": "c", "text": "`ip link set wlan0 ssid Labor`", "correct": false, "explanation": "`ip` konfiguriert keine WLAN-Verbindungen." },
|
||||
{ "id": "d", "text": "`iwconfig connect Labor`", "correct": false, "explanation": "Falsche Syntax; `iwconfig` ist zudem veraltet und kann kein WPA." },
|
||||
{ "id": "e", "text": "`hostnamectl wifi Labor`", "correct": false, "explanation": "`hostnamectl` verwaltet den Hostnamen." }
|
||||
],
|
||||
"explanation": "Interaktiv geht es mit `nmtui`. Passwörter nicht in der Shell-History stehen lassen (`--ask`).",
|
||||
"references": ["man 1 nmcli"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-007",
|
||||
"objective": "109.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Aufruf sendet genau vier Echo Requests und beendet sich dann?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ping -c 4 host01`", "correct": true, "explanation": "`-c` (count) begrenzt die Anzahl." },
|
||||
{ "id": "b", "text": "`ping -n 4 host01`", "correct": false, "explanation": "`-n` ist bei Linux „numerische Ausgabe“; die Windows-Syntax hat hier keine Wirkung auf die Anzahl." },
|
||||
{ "id": "c", "text": "`ping -i 4 host01`", "correct": false, "explanation": "`-i` setzt den Abstand zwischen Paketen in Sekunden." },
|
||||
{ "id": "d", "text": "`ping -s 4 host01`", "correct": false, "explanation": "`-s` setzt die Nutzdatengröße." },
|
||||
{ "id": "e", "text": "`ping -w 4 host01`", "correct": false, "explanation": "`-w` ist eine Gesamtzeitgrenze in Sekunden." }
|
||||
],
|
||||
"explanation": "Ohne `-c` läuft ping unter Linux bis Strg+C. IPv6: `ping -6` bzw. `ping6`.",
|
||||
"references": ["man 8 ping"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-008",
|
||||
"objective": "109.3",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welchem `ip`-Aufruf (Befehl und Objekt) zeigt man die Neighbor-/ARP-Tabelle an?",
|
||||
"answers": ["ip neigh", "ip neighbor", "ip neighbour", "ip n", "ip neigh show"],
|
||||
"explanation": "Zeigt IP → MAC-Zuordnungen mit Zustand (REACHABLE, STALE, FAILED). Alt: `arp -n`.",
|
||||
"references": ["man 8 ip-neighbour"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-009",
|
||||
"objective": "109.3",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welcher Befehl zeigt, über welche Route, welches Gateway und welche Schnittstelle Pakete zu `198.51.100.7` gesendet würden?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ip route get 198.51.100.7`", "correct": true, "explanation": "Fragt die Routing-Entscheidung des Kernels für genau dieses Ziel ab." },
|
||||
{ "id": "b", "text": "`ip route show 198.51.100.7`", "correct": false, "explanation": "Zeigt nur Routen, die exakt diesem Präfix entsprechen – meist keine." },
|
||||
{ "id": "c", "text": "`ip addr get 198.51.100.7`", "correct": false, "explanation": "`ip addr` kennt kein `get`." },
|
||||
{ "id": "d", "text": "`ping -r 198.51.100.7`", "correct": false, "explanation": "`-r` umgeht die Routingtabelle." },
|
||||
{ "id": "e", "text": "`dig 198.51.100.7`", "correct": false, "explanation": "`dig` stellt DNS-Anfragen." }
|
||||
],
|
||||
"explanation": "Hilfreich bei mehreren Schnittstellen oder VPNs, um die gewählte Quelladresse zu sehen.",
|
||||
"references": ["man 8 ip-route"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-010",
|
||||
"objective": "109.3",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Mit welchem Befehl lässt man netcat (OpenBSD-Variante) zu Testzwecken auf TCP-Port 4444 lauschen?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`nc -l 4444`", "correct": true, "explanation": "`-l` (listen); die traditionelle Variante erwartet `nc -l -p 4444`." },
|
||||
{ "id": "b", "text": "`nc -z 4444`", "correct": false, "explanation": "`-z` prüft nur Verbindungen zu einem Ziel ohne Daten." },
|
||||
{ "id": "c", "text": "`nc -u 4444`", "correct": false, "explanation": "`-u` wählt UDP; es fehlt das Lauschen und ein Ziel." },
|
||||
{ "id": "d", "text": "`nc 4444`", "correct": false, "explanation": "`4444` würde als Hostname interpretiert." },
|
||||
{ "id": "e", "text": "`nc -v 4444`", "correct": false, "explanation": "`-v` macht nur die Ausgabe ausführlicher." }
|
||||
],
|
||||
"explanation": "Test zwischen zwei Rechnern: auf A `nc -l 4444`, auf B `nc A 4444` – getippter Text erscheint auf der Gegenseite.",
|
||||
"references": ["man 1 nc"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-011",
|
||||
"objective": "109.3",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zu `traceroute` und `tracepath` treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`traceroute` sendet Pakete mit schrittweise steigender TTL.", "correct": true, "explanation": "Jeder Router, bei dem die TTL 0 erreicht, antwortet mit ICMP Time Exceeded und verrät sich so." },
|
||||
{ "id": "b", "text": "`tracepath` benötigt keine Root-Rechte und ermittelt zusätzlich die Path-MTU.", "correct": true, "explanation": "Es nutzt UDP und wertet ICMP-Fehlermeldungen aus." },
|
||||
{ "id": "c", "text": "`traceroute` funktioniert nur, wenn auf dem Ziel TCP-Port 80 offen ist.", "correct": false, "explanation": "Standardmäßig nutzt traceroute UDP auf hohe Ports; TCP ist nur eine Option (`-T`)." },
|
||||
{ "id": "d", "text": "`traceroute` zeigt nur das Ziel, nicht die Zwischenstationen.", "correct": false, "explanation": "Genau die Zwischenstationen (Hops) sind der Zweck." },
|
||||
{ "id": "e", "text": "Ein `* * *` bedeutet immer, dass das Ziel nicht erreichbar ist.", "correct": false, "explanation": "Nur, dass dieser Hop nicht antwortet (oft gefiltert); spätere Hops können trotzdem erscheinen." }
|
||||
],
|
||||
"explanation": "`mtr` kombiniert traceroute und ping fortlaufend.",
|
||||
"references": ["man 8 traceroute", "man 8 tracepath"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-012",
|
||||
"objective": "109.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl zeigt alle **bestehenden** TCP-Verbindungen mit numerischen Adressen und Ports?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ss -tn`", "correct": true, "explanation": "Ohne `-l` oder `-a` zeigt `ss` die verbundenen (nicht lauschenden) Sockets." },
|
||||
{ "id": "b", "text": "`ss -tln`", "correct": false, "explanation": "`-l` zeigt nur lauschende Sockets." },
|
||||
{ "id": "c", "text": "`ss -un`", "correct": false, "explanation": "`-u` zeigt UDP-Sockets." },
|
||||
{ "id": "d", "text": "`ip -s link`", "correct": false, "explanation": "Zeigt Schnittstellenstatistiken." },
|
||||
{ "id": "e", "text": "`netstat -i`", "correct": false, "explanation": "Zeigt die Schnittstellentabelle mit Zählern." }
|
||||
],
|
||||
"explanation": "Filter sind möglich: `ss -tn state established '( dport = :443 )'`.",
|
||||
"references": ["man 8 ss"]
|
||||
},
|
||||
{
|
||||
"id": "109.3-013",
|
||||
"objective": "109.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl zeigt die Adressen aller Schnittstellen kompakt in **je einer Zeile**?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ip -br addr`", "correct": true, "explanation": "`-br` (brief): Name, Zustand, Adressen." },
|
||||
{ "id": "b", "text": "`ip -s link`", "correct": false, "explanation": "Zeigt Statistiken der Schnittstellen." },
|
||||
{ "id": "c", "text": "`ip route`", "correct": false, "explanation": "Zeigt die Routingtabelle." },
|
||||
{ "id": "d", "text": "`ip neigh`", "correct": false, "explanation": "Zeigt die Neighbor-/ARP-Tabelle." },
|
||||
{ "id": "e", "text": "`ss -a`", "correct": false, "explanation": "Zeigt alle Sockets." }
|
||||
],
|
||||
"explanation": "Nur IPv4: `ip -4 -br addr`. Eigene Adressen schnell: `hostname -I`.",
|
||||
"references": ["man 8 ip"]
|
||||
},
|
||||
{
|
||||
"id": "109.4-004",
|
||||
"objective": "109.4",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "`/etc/resolv.conf` enthält `search example.org`. Was bewirkt das?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Kurze Namen wie `web01` werden zusätzlich als `web01.example.org` aufgelöst.", "correct": true, "explanation": "Die Suchdomäne wird an Namen ohne (ausreichend viele) Punkte angehängt." },
|
||||
{ "id": "b", "text": "Nur Namen unter `example.org` dürfen aufgelöst werden.", "correct": false, "explanation": "`search` beschränkt nichts." },
|
||||
{ "id": "c", "text": "`example.org` wird als DNS-Server verwendet.", "correct": false, "explanation": "DNS-Server stehen in `nameserver`-Zeilen (als IP-Adresse)." },
|
||||
{ "id": "d", "text": "Der Hostname des Rechners wird auf `example.org` gesetzt.", "correct": false, "explanation": "Der Hostname steht in `/etc/hostname`." },
|
||||
{ "id": "e", "text": "Anfragen nach `example.org` werden aus `/etc/hosts` beantwortet.", "correct": false, "explanation": "Die Reihenfolge der Quellen regelt `nsswitch.conf`." }
|
||||
],
|
||||
"explanation": "Bis zu drei `nameserver`-Zeilen werden genutzt; `options timeout:2 attempts:2` steuert Wiederholungen.",
|
||||
"references": ["man 5 resolv.conf"]
|
||||
},
|
||||
{
|
||||
"id": "109.4-005",
|
||||
"objective": "109.4",
|
||||
"type": "fill",
|
||||
"difficulty": 2,
|
||||
"question": "Welcher Befehl (mit Unterbefehl) zeigt bei **systemd-resolved** die verwendeten DNS-Server je Schnittstelle?",
|
||||
"answers": ["resolvectl status", "resolvectl dns", "systemd-resolve --status"],
|
||||
"explanation": "Bei systemd-resolved zeigt `/etc/resolv.conf` meist nur den lokalen Stub `127.0.0.53`.",
|
||||
"references": ["man 1 resolvectl"]
|
||||
},
|
||||
{
|
||||
"id": "109.4-006",
|
||||
"objective": "109.4",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher `dig`-Aufruf gibt für `example.org` **nur** die aufgelöste(n) Adresse(n) aus?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`dig +short example.org`", "correct": true, "explanation": "`+short` unterdrückt alle Abschnitte bis auf die Antwortdaten." },
|
||||
{ "id": "b", "text": "`dig -x example.org`", "correct": false, "explanation": "`-x` macht eine Rückwärtsauflösung und erwartet eine IP-Adresse." },
|
||||
{ "id": "c", "text": "`dig @short example.org`", "correct": false, "explanation": "`@` wählt den abzufragenden Server – hier einen namens `short`." },
|
||||
{ "id": "d", "text": "`host -t short example.org`", "correct": false, "explanation": "`-t` erwartet einen Record-Typ wie `A`, `MX`, `AAAA`." },
|
||||
{ "id": "e", "text": "`nslookup -short example.org`", "correct": false, "explanation": "`nslookup` kennt keine Option `-short`." }
|
||||
],
|
||||
"explanation": "Record-Typ angeben: `dig example.org MX`, `dig AAAA example.org`. Bestimmten Server fragen: `dig @192.0.2.53 example.org`.",
|
||||
"references": ["man 1 dig"]
|
||||
},
|
||||
{
|
||||
"id": "109.4-007",
|
||||
"objective": "109.4",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zur clientseitigen Namensauflösung treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`getent hosts web01` berücksichtigt die Reihenfolge aus `/etc/nsswitch.conf`, also auch `/etc/hosts`.", "correct": true, "explanation": "`getent` nutzt dieselbe Kette wie normale Programme." },
|
||||
{ "id": "b", "text": "`dig -x 192.0.2.10` fragt den PTR-Eintrag (Rückwärtsauflösung) ab.", "correct": true, "explanation": "Abgefragt wird `10.2.0.192.in-addr.arpa`." },
|
||||
{ "id": "c", "text": "`host -t MX example.org` liefert die A-Records von `example.org`.", "correct": false, "explanation": "Es liefert die **MX**-Records (Mailserver)." },
|
||||
{ "id": "d", "text": "Mit `hosts: dns files` in `nsswitch.conf` wird `/etc/hosts` zuerst befragt.", "correct": false, "explanation": "Die Reihenfolge ist von links nach rechts: zuerst DNS." },
|
||||
{ "id": "e", "text": "Beliebig viele `nameserver`-Zeilen in `/etc/resolv.conf` werden genutzt.", "correct": false, "explanation": "Die glibc nutzt höchstens drei." }
|
||||
],
|
||||
"explanation": "Fehlersuche: `dig` (nur DNS) mit `getent hosts` (NSS) vergleichen.",
|
||||
"references": ["man 5 nsswitch.conf", "man 1 dig"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,311 @@
|
||||
{
|
||||
"$schema": "../schema/questions.schema.json",
|
||||
"format": "lpic-sim-questions",
|
||||
"meta": {
|
||||
"file": "questions_110_set2.json",
|
||||
"brief": "Zweiter Fragensatz 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 (30.10.2026)"
|
||||
},
|
||||
"exam": "lpic1-102",
|
||||
"questions": [
|
||||
{
|
||||
"id": "110.1-005",
|
||||
"objective": "110.1",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "`umount /mnt/usb` meldet „target is busy“. Mit welchen Befehlen findet man die Prozesse, die das Dateisystem noch verwenden?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`fuser -vm /mnt/usb`", "correct": true, "explanation": "`-m` betrachtet das ganze eingehängte Dateisystem, `-v` zeigt Benutzer, PID und Zugriffsart." },
|
||||
{ "id": "b", "text": "`lsof /mnt/usb`", "correct": true, "explanation": "Für einen Einhängepunkt listet `lsof` alle offenen Dateien auf diesem Dateisystem." },
|
||||
{ "id": "c", "text": "`df /mnt/usb`", "correct": false, "explanation": "Zeigt nur Belegung und Größe." },
|
||||
{ "id": "d", "text": "`mount -l`", "correct": false, "explanation": "Listet eingehängte Dateisysteme mit Labels." },
|
||||
{ "id": "e", "text": "`ps -m`", "correct": false, "explanation": "`-m` zeigt Threads, keine Dateibezüge." }
|
||||
],
|
||||
"explanation": "Häufige Ursache: Eine Shell steht mit ihrem aktuellen Verzeichnis im Einhängepunkt. `fuser -km` beendet die Prozesse (Vorsicht).",
|
||||
"references": ["man 1 fuser", "man 8 lsof"]
|
||||
},
|
||||
{
|
||||
"id": "110.1-006",
|
||||
"objective": "110.1",
|
||||
"type": "fill",
|
||||
"difficulty": 2,
|
||||
"question": "In welcher Datei (vollständiger Pfad) legt man über PAM dauerhafte Ressourcenlimits (wie bei `ulimit`) für Benutzer und Gruppen fest?",
|
||||
"answers": ["/etc/security/limits.conf"],
|
||||
"explanation": "Zeilen der Form `<domain> <soft|hard> <item> <wert>`, z. B. `@studenten hard nproc 100`. Ergänzungen in `/etc/security/limits.d/`.",
|
||||
"references": ["man 5 limits.conf"]
|
||||
},
|
||||
{
|
||||
"id": "110.1-007",
|
||||
"objective": "110.1",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Was erlaubt die sudoers-Zeile `bob ALL=(root) /usr/bin/systemctl restart nginx`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`bob` darf auf allen Hosts genau diesen Befehl als root ausführen (mit seinem eigenen Passwort).", "correct": true, "explanation": "Aufbau: Benutzer Hosts=(Zielbenutzer) Befehle." },
|
||||
{ "id": "b", "text": "`bob` darf alle Befehle als root ausführen.", "correct": false, "explanation": "Dafür stünde am Ende `ALL`." },
|
||||
{ "id": "c", "text": "`bob` darf nginx ohne Passwort neu starten.", "correct": false, "explanation": "Ohne Passwortabfrage nur mit `NOPASSWD:` vor dem Befehl." },
|
||||
{ "id": "d", "text": "root darf Befehle als `bob` ausführen.", "correct": false, "explanation": "Die Zeile berechtigt `bob`, nicht root." },
|
||||
{ "id": "e", "text": "`bob` muss das root-Passwort eingeben.", "correct": false, "explanation": "sudo fragt standardmäßig das Passwort des **aufrufenden** Benutzers." }
|
||||
],
|
||||
"explanation": "Gruppen beginnen mit `%`, z. B. `%admin ALL=(ALL:ALL) ALL`. Erlaubte Befehle zeigt `sudo -l`.",
|
||||
"references": ["man 5 sudoers"]
|
||||
},
|
||||
{
|
||||
"id": "110.1-008",
|
||||
"objective": "110.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Was bewirkt `su - anna`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Es startet eine Login-Shell als `anna` mit deren Umgebung und Home-Verzeichnis.", "correct": true, "explanation": "`-` (bzw. `-l`) simuliert eine vollständige Anmeldung." },
|
||||
{ "id": "b", "text": "Es wechselt zu `anna`, behält aber Umgebung und Verzeichnis des Aufrufers.", "correct": false, "explanation": "Das macht `su anna` **ohne** Bindestrich." },
|
||||
{ "id": "c", "text": "Es entfernt das Konto `anna`.", "correct": false, "explanation": "Konten löscht `userdel`." },
|
||||
{ "id": "d", "text": "Es führt einen Befehl als root aus und fragt nach dem Passwort von `anna`.", "correct": false, "explanation": "`su` fragt nach dem Passwort des **Zielbenutzers** (hier anna), außer root ruft auf." },
|
||||
{ "id": "e", "text": "Es sperrt `anna` für die Dauer der Sitzung.", "correct": false, "explanation": "`su` sperrt keine Konten." }
|
||||
],
|
||||
"explanation": "Einzelnen Befehl: `su - anna -c \"befehl\"`. Ohne Benutzername wechselt `su` zu root.",
|
||||
"references": ["man 1 su"]
|
||||
},
|
||||
{
|
||||
"id": "110.1-009",
|
||||
"objective": "110.1",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher Befehl zeigt **fehlgeschlagene** Anmeldeversuche aus `/var/log/btmp`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`lastb`", "correct": true, "explanation": "„last bad“; nur für root lesbar." },
|
||||
{ "id": "b", "text": "`last`", "correct": false, "explanation": "Zeigt erfolgreiche Anmeldungen aus `wtmp`." },
|
||||
{ "id": "c", "text": "`lastlog`", "correct": false, "explanation": "Zeigt je Benutzer die letzte Anmeldung." },
|
||||
{ "id": "d", "text": "`who`", "correct": false, "explanation": "Zeigt aktuell angemeldete Benutzer." },
|
||||
{ "id": "e", "text": "`w`", "correct": false, "explanation": "Zeigt angemeldete Benutzer und deren Aktivität." }
|
||||
],
|
||||
"explanation": "Viele fehlgeschlagene SSH-Anmeldungen sind ein Hinweis auf Brute-Force-Versuche (Abhilfe z. B. Schlüssel statt Passwort).",
|
||||
"references": ["man 1 last"]
|
||||
},
|
||||
{
|
||||
"id": "110.1-010",
|
||||
"objective": "110.1",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zu `nmap` treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`nmap -sT host01` führt einen TCP-Connect-Scan durch.", "correct": true, "explanation": "Baut vollständige TCP-Verbindungen auf; braucht keine Root-Rechte." },
|
||||
{ "id": "b", "text": "Portscans sollten nur gegen eigene Systeme oder mit ausdrücklicher Erlaubnis laufen.", "correct": true, "explanation": "Fremde Systeme zu scannen kann rechtliche Folgen haben." },
|
||||
{ "id": "c", "text": "`nmap` ändert die Firewall-Regeln des Ziels.", "correct": false, "explanation": "`nmap` beobachtet nur, es konfiguriert nichts." },
|
||||
{ "id": "d", "text": "`nmap -p 22 host01` scannt alle Ports außer 22.", "correct": false, "explanation": "`-p 22` scannt **nur** Port 22." },
|
||||
{ "id": "e", "text": "`nmap` kann nur den eigenen Rechner prüfen.", "correct": false, "explanation": "Es scannt beliebige erreichbare Hosts und Netze." }
|
||||
],
|
||||
"explanation": "Ohne Angabe prüft nmap die 1000 häufigsten Ports. `-sU` scannt UDP, `-sV` erkennt Dienstversionen.",
|
||||
"references": ["man 1 nmap"]
|
||||
},
|
||||
{
|
||||
"id": "110.2-006",
|
||||
"objective": "110.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Was bewirkt `systemctl mask cups.service`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Die Unit wird auf `/dev/null` verlinkt und kann weder manuell noch als Abhängigkeit gestartet werden.", "correct": true, "explanation": "Stärker als `disable`; rückgängig mit `systemctl unmask`." },
|
||||
{ "id": "b", "text": "Der Dienst wird nur beim nächsten Start nicht automatisch gestartet.", "correct": false, "explanation": "Das ist `disable`; manuell starten ginge weiterhin." },
|
||||
{ "id": "c", "text": "Der Dienst wird versteckt, läuft aber weiter.", "correct": false, "explanation": "`mask` stoppt einen laufenden Dienst nicht automatisch – starten lässt er sich danach aber nicht mehr." },
|
||||
{ "id": "d", "text": "Die Protokollausgabe des Dienstes wird unterdrückt.", "correct": false, "explanation": "`mask` hat mit Logging nichts zu tun." },
|
||||
{ "id": "e", "text": "Der Dienst läuft danach nur noch für root.", "correct": false, "explanation": "`mask` kennt keine Benutzerbeschränkung." }
|
||||
],
|
||||
"explanation": "Zum sofortigen Stoppen zusätzlich `--now` angeben. Status `masked` zeigt `systemctl status` bzw. `list-unit-files`.",
|
||||
"references": ["man 1 systemctl"]
|
||||
},
|
||||
{
|
||||
"id": "110.2-007",
|
||||
"objective": "110.2",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Was passiert, wenn ein Benutzer mit der Login-Shell `/usr/sbin/nologin` sich per SSH anmelden will?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Eine Meldung wird ausgegeben und die Verbindung beendet; eine interaktive Sitzung entsteht nicht.", "correct": true, "explanation": "`nologin` gibt „This account is currently not available.“ (bzw. `/etc/nologin.txt`) aus und endet mit Fehler." },
|
||||
{ "id": "b", "text": "Der Benutzer erhält eine eingeschränkte Bash.", "correct": false, "explanation": "Es wird gar keine Shell gestartet." },
|
||||
{ "id": "c", "text": "Das Konto wird dauerhaft gelöscht.", "correct": false, "explanation": "`nologin` ändert keine Konten." },
|
||||
{ "id": "d", "text": "Die Anmeldung gelingt nur mit SSH-Schlüssel.", "correct": false, "explanation": "Auch mit Schlüssel endet die Sitzung sofort." },
|
||||
{ "id": "e", "text": "Es gilt nur für root, normale Benutzer sind nicht betroffen.", "correct": false, "explanation": "Es gilt für jedes Konto mit dieser Shell." }
|
||||
],
|
||||
"explanation": "Nicht verwechseln mit `/etc/nologin`: Diese Datei sperrt **alle** Nicht-root-Anmeldungen, solange sie existiert.",
|
||||
"references": ["man 8 nologin"]
|
||||
},
|
||||
{
|
||||
"id": "110.2-008",
|
||||
"objective": "110.2",
|
||||
"type": "fill",
|
||||
"difficulty": 2,
|
||||
"question": "Mit welchem `systemctl`-Aufruf (Befehl und Unterbefehl) listet man alle Socket-Units mit ihren lauschenden Adressen auf?",
|
||||
"answers": ["systemctl list-sockets"],
|
||||
"explanation": "Socket-Units (`*.socket`) lauschen stellvertretend und starten den Dienst bei Bedarf.",
|
||||
"references": ["man 1 systemctl", "man 5 systemd.socket"]
|
||||
},
|
||||
{
|
||||
"id": "110.2-009",
|
||||
"objective": "110.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussage zu **xinetd** trifft zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Als Super-Server lauscht er für mehrere Dienste und startet sie erst bei einer Verbindung; Konfiguration in `/etc/xinetd.conf` und `/etc/xinetd.d/`.", "correct": true, "explanation": "In `/etc/xinetd.d/<dienst>` schaltet `disable = yes` einen Dienst ab." },
|
||||
{ "id": "b", "text": "xinetd ist eine Firewall auf Paketebene.", "correct": false, "explanation": "Paketfilter sind z. B. nftables/iptables." },
|
||||
{ "id": "c", "text": "xinetd ersetzt den Kernel-Scheduler.", "correct": false, "explanation": "Kein Zusammenhang." },
|
||||
{ "id": "d", "text": "xinetd wird über `/etc/inittab` konfiguriert.", "correct": false, "explanation": "`/etc/inittab` gehört zu SysV-init." },
|
||||
{ "id": "e", "text": "xinetd ist der Nachfolger von systemd.", "correct": false, "explanation": "Umgekehrt: systemd-Socket-Units übernehmen heute meist diese Aufgabe." }
|
||||
],
|
||||
"explanation": "Auf modernen Systemen selten; Prinzip „Dienste nur bei Bedarf starten“ lebt in systemd-Socket-Aktivierung weiter.",
|
||||
"references": ["man 8 xinetd", "man 5 xinetd.conf"]
|
||||
},
|
||||
{
|
||||
"id": "110.2-010",
|
||||
"objective": "110.2",
|
||||
"type": "multi",
|
||||
"difficulty": 1,
|
||||
"question": "Welche Maßnahmen verringern die **Angriffsfläche** eines Servers?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Nicht benötigte Dienste stoppen und deaktivieren", "correct": true, "explanation": "Jeder laufende Netzwerkdienst ist ein möglicher Angriffspunkt." },
|
||||
{ "id": "b", "text": "Dienste, die nur lokal gebraucht werden, nur an `127.0.0.1` binden", "correct": true, "explanation": "Dann sind sie aus dem Netz nicht erreichbar." },
|
||||
{ "id": "c", "text": "`/etc/shadow` für alle lesbar machen (644)", "correct": false, "explanation": "Damit könnten alle Benutzer die Hashes offline knacken." },
|
||||
{ "id": "d", "text": "SSH-Anmeldung als root mit Passwort erlauben", "correct": false, "explanation": "Erhöht das Risiko durch Passwortraten auf das mächtigste Konto." },
|
||||
{ "id": "e", "text": "Telnet für die Fernwartung verwenden", "correct": false, "explanation": "Telnet überträgt alles inklusive Passwort im Klartext." }
|
||||
],
|
||||
"explanation": "Vorgehen: lauschende Ports ermitteln (`ss -tulpn`), unnötige Dienste abschalten, Rest mit Firewall und Updates absichern.",
|
||||
"references": ["LPI 102-500 Objective 110.2"]
|
||||
},
|
||||
{
|
||||
"id": "110.2-011",
|
||||
"objective": "110.2",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussage zur **Socket-Aktivierung** bei systemd trifft zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "systemd lauscht selbst auf dem Socket und startet den zugehörigen Dienst erst bei der ersten Verbindung.", "correct": true, "explanation": "Die `.socket`-Unit hält den Port offen und übergibt ihn an den Dienst." },
|
||||
{ "id": "b", "text": "Der Dienst muss vorher manuell gestartet sein, sonst gehen Verbindungen verloren.", "correct": false, "explanation": "Gerade das Gegenteil: Verbindungen werden gepuffert, bis der Dienst läuft." },
|
||||
{ "id": "c", "text": "Socket-Units ersetzen die Firewall.", "correct": false, "explanation": "Sie regeln nicht, **wer** sich verbinden darf." },
|
||||
{ "id": "d", "text": "Socket-Aktivierung funktioniert nur mit UDP.", "correct": false, "explanation": "TCP, UDP und Unix-Sockets werden unterstützt." },
|
||||
{ "id": "e", "text": "Socket-Units werden in `/etc/xinetd.d/` konfiguriert.", "correct": false, "explanation": "Sie liegen wie andere Units z. B. unter `/etc/systemd/system/`." }
|
||||
],
|
||||
"explanation": "Beispiel: `ssh.socket` statt `ssh.service`. Auch eine deaktivierte Service-Unit kann so über ihre aktive Socket-Unit gestartet werden – beim Härten beide prüfen.",
|
||||
"references": ["man 5 systemd.socket"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-007",
|
||||
"objective": "110.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wie überträgt man den eigenen öffentlichen SSH-Schlüssel am einfachsten auf den Server `host01`?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ssh-copy-id anna@host01`", "correct": true, "explanation": "Hängt den öffentlichen Schlüssel an `~/.ssh/authorized_keys` auf dem Server an und setzt passende Rechte." },
|
||||
{ "id": "b", "text": "`scp ~/.ssh/id_ed25519 anna@host01:`", "correct": false, "explanation": "Kopiert den **privaten** Schlüssel – ein Sicherheitsproblem und wirkungslos für die Anmeldung." },
|
||||
{ "id": "c", "text": "`ssh-add anna@host01`", "correct": false, "explanation": "`ssh-add` lädt Schlüssel in den lokalen ssh-agent." },
|
||||
{ "id": "d", "text": "`ssh-keyscan host01`", "correct": false, "explanation": "Holt die **Host**-Schlüssel des Servers ab." },
|
||||
{ "id": "e", "text": "`ssh-agent anna@host01`", "correct": false, "explanation": "`ssh-agent` hält Schlüssel im Speicher, überträgt nichts." }
|
||||
],
|
||||
"explanation": "Mit `-i ~/.ssh/datei.pub` wählt man einen bestimmten Schlüssel.",
|
||||
"references": ["man 1 ssh-copy-id"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-008",
|
||||
"objective": "110.3",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Wie heißt die Konfigurationsdatei des OpenSSH-**Servers**? (vollständiger Pfad)",
|
||||
"answers": ["/etc/ssh/sshd_config"],
|
||||
"explanation": "Die Client-Konfiguration ist `/etc/ssh/ssh_config` bzw. `~/.ssh/config`. Nach Änderungen `sshd -t` prüfen und den Dienst neu laden.",
|
||||
"references": ["man 5 sshd_config"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-009",
|
||||
"objective": "110.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Welcher GnuPG-Befehl listet die öffentlichen Schlüssel im eigenen Schlüsselbund auf?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`gpg --list-keys`", "correct": true, "explanation": "Kurzform `gpg -k`." },
|
||||
{ "id": "b", "text": "`gpg --list-secret-keys`", "correct": false, "explanation": "Listet die **privaten** Schlüssel (`-K`)." },
|
||||
{ "id": "c", "text": "`gpg --export`", "correct": false, "explanation": "Gibt öffentliche Schlüssel zur Weitergabe aus (binär oder mit `--armor`)." },
|
||||
{ "id": "d", "text": "`gpg --import`", "correct": false, "explanation": "Importiert Schlüssel aus einer Datei." },
|
||||
{ "id": "e", "text": "`gpg --verify`", "correct": false, "explanation": "Prüft Signaturen." }
|
||||
],
|
||||
"explanation": "Schlüsselbund liegt in `~/.gnupg/`. Schlüssel verteilen: `gpg --export --armor anna@example.org > anna.asc`.",
|
||||
"references": ["man 1 gpg"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-010",
|
||||
"objective": "110.3",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Zu `release.tar.gz` gibt es die abgetrennte Signatur `release.tar.gz.sig`. Wie prüft man sie?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`gpg --verify release.tar.gz.sig release.tar.gz`", "correct": true, "explanation": "Erst die Signatur, dann die signierte Datei; der öffentliche Schlüssel des Signierers muss importiert sein." },
|
||||
{ "id": "b", "text": "`gpg --decrypt release.tar.gz`", "correct": false, "explanation": "Die Datei ist nicht verschlüsselt, nur signiert." },
|
||||
{ "id": "c", "text": "`gpg --sign release.tar.gz.sig`", "correct": false, "explanation": "Würde selbst eine neue Signatur erstellen." },
|
||||
{ "id": "d", "text": "`sha256sum release.tar.gz.sig`", "correct": false, "explanation": "Berechnet nur eine Prüfsumme der Signaturdatei." },
|
||||
{ "id": "e", "text": "`gpg --list-keys release.tar.gz`", "correct": false, "explanation": "Listet Schlüssel, prüft nichts." }
|
||||
],
|
||||
"explanation": "„Good signature“ heißt nur: passt zum Schlüssel. Ob der Schlüssel vertrauenswürdig ist, zeigt der Fingerabdruck-Abgleich über einen sicheren Kanal.",
|
||||
"references": ["man 1 gpg"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-011",
|
||||
"objective": "110.3",
|
||||
"type": "single",
|
||||
"difficulty": 1,
|
||||
"question": "Wie lädt man den privaten Schlüssel `~/.ssh/id_ed25519` in einen laufenden **ssh-agent**?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`ssh-add ~/.ssh/id_ed25519`", "correct": true, "explanation": "Fragt einmal nach der Passphrase; danach nutzt ssh den Schlüssel aus dem Agent. `ssh-add -l` listet geladene Schlüssel." },
|
||||
{ "id": "b", "text": "`ssh -A ~/.ssh/id_ed25519`", "correct": false, "explanation": "`-A` aktiviert Agent-Weiterleitung für eine Verbindung." },
|
||||
{ "id": "c", "text": "`ssh-keygen -a ~/.ssh/id_ed25519`", "correct": false, "explanation": "`-a` legt die Anzahl der KDF-Runden beim Erzeugen fest." },
|
||||
{ "id": "d", "text": "`ssh-copy-id ~/.ssh/id_ed25519`", "correct": false, "explanation": "Überträgt einen öffentlichen Schlüssel auf einen Server." },
|
||||
{ "id": "e", "text": "`ssh-agent -k`", "correct": false, "explanation": "`-k` beendet den laufenden Agent." }
|
||||
],
|
||||
"explanation": "Agent starten (falls nicht durch die Desktop-Sitzung geschehen): `eval \"$(ssh-agent)\"`.",
|
||||
"references": ["man 1 ssh-add", "man 1 ssh-agent"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-012",
|
||||
"objective": "110.3",
|
||||
"type": "multi",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Aussagen zu GnuPG treffen zu?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "Man verschlüsselt mit dem **öffentlichen** Schlüssel des Empfängers.", "correct": true, "explanation": "Nur der Inhaber des passenden privaten Schlüssels kann entschlüsseln." },
|
||||
{ "id": "b", "text": "Man signiert mit dem eigenen **privaten** Schlüssel.", "correct": true, "explanation": "Jeder mit dem öffentlichen Schlüssel kann die Signatur prüfen." },
|
||||
{ "id": "c", "text": "Der Empfänger entschlüsselt mit dem öffentlichen Schlüssel des Absenders.", "correct": false, "explanation": "Entschlüsselt wird mit dem eigenen privaten Schlüssel." },
|
||||
{ "id": "d", "text": "Ein Widerrufszertifikat dient zum Verschlüsseln von Dateien.", "correct": false, "explanation": "Es erklärt einen Schlüssel für ungültig, z. B. nach Verlust." },
|
||||
{ "id": "e", "text": "`~/.gnupg` sollte für alle lesbar sein, damit andere die Schlüssel finden.", "correct": false, "explanation": "Das Verzeichnis enthält private Schlüssel und muss privat bleiben (700); öffentliche Schlüssel verteilt man per Export." }
|
||||
],
|
||||
"explanation": "Hintergrund-Daemon: `gpg-agent` verwaltet Passphrasen; Widerrufszertifikat erzeugen mit `gpg --gen-revoke`.",
|
||||
"references": ["man 1 gpg"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-013",
|
||||
"objective": "110.3",
|
||||
"type": "fill",
|
||||
"difficulty": 1,
|
||||
"question": "Mit welcher `ssh`-Option gibt man eine bestimmte Datei mit dem privaten Schlüssel für die Anmeldung an? (nur die Option)",
|
||||
"answers": ["-i"],
|
||||
"explanation": "Beispiel: `ssh -i ~/.ssh/labor_ed25519 anna@host01`. Dauerhaft in `~/.ssh/config` mit `IdentityFile`.",
|
||||
"references": ["man 1 ssh"]
|
||||
},
|
||||
{
|
||||
"id": "110.3-014",
|
||||
"objective": "110.3",
|
||||
"type": "single",
|
||||
"difficulty": 2,
|
||||
"question": "Welche Einstellung in `/etc/ssh/sshd_config` verbietet die Anmeldung per **Passwort** für alle Benutzer?",
|
||||
"options": [
|
||||
{ "id": "a", "text": "`PasswordAuthentication no`", "correct": true, "explanation": "Danach sind nur noch Schlüssel bzw. andere Verfahren möglich – vorher Schlüssel-Anmeldung testen!" },
|
||||
{ "id": "b", "text": "`PermitRootLogin no`", "correct": false, "explanation": "Verbietet nur die Anmeldung als root." },
|
||||
{ "id": "c", "text": "`PubkeyAuthentication no`", "correct": false, "explanation": "Verbietet die Schlüssel-Anmeldung – das Gegenteil." },
|
||||
{ "id": "d", "text": "`AllowUsers none`", "correct": false, "explanation": "Erlaubt nur einem Benutzer namens `none` die Anmeldung." },
|
||||
{ "id": "e", "text": "`X11Forwarding no`", "correct": false, "explanation": "Betrifft nur die X11-Weiterleitung." }
|
||||
],
|
||||
"explanation": "Abhängig von PAM sollte zusätzlich `KbdInteractiveAuthentication no` gesetzt sein, sonst ist eine Passwortabfrage über PAM noch möglich.",
|
||||
"references": ["man 5 sshd_config"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user