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 TOPICS

GUI–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 shutdown halts the system

    • is reserved to the super user

  • reboot with shutfown : shutdowdn -r

  • shutdown notifies all Users with the wall command

Examples:

shutdown -h 11:15
shutdown -r +20
shutdown -c (Linux: cancel running shutdown)

What about processes ?

A System Halt via shutdown throws out users, and kills all processes :

  • first via SIGTERM

  • then via SIGKILL

SKIP : Network File System

System 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 in syslogd ist 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 :

WertKonstanteNameBeschreibung
0LOG_EMERGemergencySystem unbenutzbar (Panik)
1LOG_ALERTalertsofortige Aktion nötig
2LOG_CRITcriticalkritische Bedingungen (HW-Fehler)
3LOG_ERRerrorFehlerzustand
4LOG_WARNwarningWarnung
5LOG_NOTICEnoticenormal, aber wichtig
6LOG_INFOinfoInfo-Nachricht
7LOG_DEBUGdebugDebug-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 -a zeigt die momentan gestzten Limits der Shell und die von Ihr gestarteten Prozesse

Limiting 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
    sysctl kernel variable, or
    – system–specific files (FreeBSD: /etc/login.conf)
    – user via ulimit

  • soft limit (may be lowered/raised by user), ≤ hard limit
    (use ulimit -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