26-06-2025
Cue Column
Single User Mode
System HALTS
System Messages
Questions
Wie läuft ein System HALT ab ?
Action Items for Self
[ ]
[ ]
[ ]
Action Items for Others
[ ]
[ ]
[ ]
Note Taking Area
Single User Mode, Definition
only root is allowed to log in
only root filesystem is mounted
only for special tasks
repair filesystems after system crash
forensics/clean-up after system break–in
fix problems in critical system files
Invoking Single User Mode
Use shutdown without -h or -r.
On loader prompt use boot -s
On loader menu use single user
SKIPPED SOME IRRELEVANT TOPICSGUI–Login Prompt: Problem ⛔
requires root privilegs (graphics card)
insecure first solution:
SETUID /usr/local/bin/X from terminal,more secure solution: display manager
(xdm, kdm, gdm, slim, …as root, provides login)System HALT
THe command
shutdownhalts the system
is reserved to the super user
reboot with shutfown :
shutdowdn -r
shutdownnotifies all Users with thewallcommandExamples:
shutdown -h 11:15
shutdown -r +20
shutdown -c(Linux: cancel running shutdown)What about processes ?
A System Halt via
shutdownthrows out users, and kills all processes :
first via
SIGTERMthen via
SIGKILL
SKIP : Network File SystemSystem Logging 📰
Viele Teile des Systems (z. B. Kernel, sshd, httpd) erzeugen Meldungen.
Diese Nachrichten gehen in das System-Log (über den Logging-Dienst
syslogd).Logs werden dann gefiltert, gespeichert (z. B. in Dateien unter
/var/log/), und können später analysiert werden.Important
Alles, was im System passiert, schreibt eine „Fußspur“ ins Log.
Das Log insyslogdist somit wie eine Zeitung des Systems.Nuclear World Example
Wir nutzen das Nuclear World Example um zu verdeutlichen :
Priority der Meldung
Facility - von welchem SubSystem kommt die Meldung
Configuration - Wohin soll die Meldung ? (Datei, Konsole, Remote-Server).
Was ist Auditing ?
Important
Auditing gibt uns Informationen darüber ==who did what to what==
Wie kann man innerhalb des System Logs schreiben ? ✍️
Assume two processes are working simultanously
→ Serializability
Assume we want to store System Logs somewhere else
→ Configurability
SOLUTION : Spezieller Prozess
syslogd- System Log Daemon
serializes write requests
can be configured
may be reached over a network
System Messages : Facility 💬
Frage : Von welchem Subsystem kommen die Nachrichten ?
Kernel
Mail System
System Daemons
Printer Systems
Was bedeutet hier Facility ?
Facility ⇒ Von wem kommen die Nachrichten ?
System Messages : Priority
- Wie wichtig ist die Log Nachricht ?
Tabelle von Systems Message Priorities :
Wert Konstante Name Beschreibung 0 LOG_EMERG emergency System unbenutzbar (Panik) 1 LOG_ALERT alert sofortige Aktion nötig 2 LOG_CRIT critical kritische Bedingungen (HW-Fehler) 3 LOG_ERR error Fehlerzustand 4 LOG_WARN warning Warnung 5 LOG_NOTICE notice normal, aber wichtig 6 LOG_INFO info Info-Nachricht 7 LOG_DEBUG debug Debug-Details Limiting Users - Was machen um Probleme zu umgehen ?
Do not Interfere with other Users
Do not Interfere with processes
Limiting Users - Pre Process Limits (1)
Important
Das Kommando
ulimit -azeigt die momentan gestzten Limits der Shell und die von Ihr gestarteten ProzesseLimiting Users: Per-Process Limits (2) ⌛
Kernel Limit : absolute system limit - usually in kernel file
hard limit(may only be lowered by user), set by
– system admin in global login script/etc/profile, or
–sysctlkernel variable, or
– system–specific files (FreeBSD:/etc/login.conf)
– user viaulimit
soft limit(may be lowered/raised by user), ≤ hard limit
(useulimit -S)Limiting Users: Disk Quotas
cannot be enforced on process leve
FS - property
MUST be enabled in Kernel 🖥️
MUST be set when mounting file system
command quota -v lists disk usage
command edquota -u user sets user limit
==Note: quotas slow down writing to disk==
Summaries
Important