Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung Nächste Überarbeitung Beide Seiten, nächste Überarbeitung | ||
admin_grundlagen:bootloader [2020/11/11 09:08] ingo_wichmann [Grub2 mit Passwort absichern] |
admin_grundlagen:bootloader [2023/08/03 08:44] ingo_wichmann [Grub2 mit Passwort absichern] |
||
---|---|---|---|
Zeile 54: | Zeile 54: | ||
==== Grub2 mit Passwort absichern ==== | ==== Grub2 mit Passwort absichern ==== | ||
=== Root Passwort ändern === | === Root Passwort ändern === | ||
- | Grub Bootprompt: ''init=/bin/bash'' als Parameter zum Linux Kernel hinzufügen | + | Grub Bootprompt: ''init=/bin/bash'' als Parameter zum Linux Kernel hinzufügen, evtl. ''ro'', ''quiet'' und ''splash=silent'' entfernen. (( siehe |
+ | man bootparam | ||
+ | )) | ||
Kernel mit ''strg+x'' booten | Kernel mit ''strg+x'' booten | ||
Zeile 61: | Zeile 63: | ||
passwd | passwd | ||
+ | ++++ bei Systemem mit SELinux | ||
touch /.autorelabel | touch /.autorelabel | ||
+ | ++++ | ||
- | ((nur bei Systemen mit aktiviertem SELinux notwendig)) | ||
- | |||
- | mount -o remount,ro / | ||
exec /sbin/init | exec /sbin/init | ||
=== Grub absichern === | === Grub absichern === | ||
+ | (( Weitere Absicherungsmöglichkeiten: | ||
+ | http://0pointer.net/blog/unlocking-luks2-volumes-with-tpm2-fido2-pkcs11-security-hardware-on-systemd-248.html | ||
+ | )) | ||
+ | |||
== Passwort Hash erzeugen == | == Passwort Hash erzeugen == | ||
- | Debian 6, CentOS (ab 7), openSuSE Leap 15.1: | + | Debian (6), CentOS (ab 7), openSuSE Leap (ab 15.1): |
grub2-mkpasswd-pbkdf2 | grub2-mkpasswd-pbkdf2 | ||
Zeile 99: | Zeile 104: | ||
Für BIOS-Systeme: | Für BIOS-Systeme: | ||
- | Debian (ab 6), Ubuntu (14.04): | + | Debian (ab 6), Ubuntu (ab 14.04): |
grub-mkconfig -o /boot/grub/grub.cfg | grub-mkconfig -o /boot/grub/grub.cfg | ||
- | CentOS (ab 7), openSuSE (Leap 15.1): | + | CentOS (ab 7), openSuSE (ab Leap 15.1): |
grub2-mkconfig -o /boot/grub2/grub.cfg | grub2-mkconfig -o /boot/grub2/grub.cfg | ||
Für UEFI-Systeme: | Für UEFI-Systeme: | ||
- | Debian, openSuSE: wie bei BIOS-Systemen | + | Debian, Ubuntu, openSuSE: wie bei BIOS-Systemen |
CentOS (8) | CentOS (8) | ||
Zeile 114: | Zeile 119: | ||
== testen == | == testen == | ||
Debian (ab 6), Ubuntu (14.04): | Debian (ab 6), Ubuntu (14.04): | ||
- | grep password /boot/grub/grub.cfg | + | grep -E 'superusers|password_pbkdf2' /boot/grub/grub.cfg |
reboot | reboot | ||
CentOS (ab 7): | CentOS (ab 7): | ||
- | grep password /boot/grub2/grub.cfg | + | grep -E 'superusers|password_pbkdf2' /boot/grub2/grub.cfg |
reboot | reboot | ||