Next revision | Previous revision |
redhat:other-redhat:reset-root-pw [2017/04/02 10:23] – created michael | redhat:other-redhat:reset-root-pw [2019/03/07 14:48] (current) – michael |
---|
====== Root Passwort zurücksetzen ====== | ====== RESET root Password on CentOS / RHEL7 ====== |
| |
| |
Ist das aktuelle root Passwort nicht mehr bekannt, so muss dies zurücksetzt werden. | Wenn das aktuelle root Passwort nicht mehr bekannt ist, so muss dies zurücksetzt werden. |
| |
| |
⦁ Im Bootloader Standarteintrag editieren und bei „Linux16“ (am Ende) rd.break eintragen. ->> mit CTRL + X booten | <WRAP center box 100%> |
| * **Schritt 1** - ''Denn automatischen Bootprozess mit den **Pfeiltasten "auf / ab"** unterbrechen, anschliessend den Bootloader Standarteintrag durch drücken von von "**e**" editieren'' {{ :redhat:other-redhat:how-to-reset-forgotten-root-password-step1.png?nolink |}} |
| |
⦁ System root mit RW mounten: ->> mount –oremount,rw /sysroot | ---- |
⦁ In richtiges Root System wechseln. ->> chroot /sysroot | |
⦁ Passwort neu setzen: ->> passwd root >> (Neues PW 2x eingeben) | |
⦁ SELinux relabeling (beim nächsten boot) veranlassen: ->> touch /.autorelabel | |
⦁ System neustarten: ->> exit ->> reboot | |
| |
| * **Schritt 2** - ''Ergänzung bei "**Linux16**" //(am Ende der Zeile)// **"rd.break" eintragen**. -> danach das System mit **CTRL + X** booten!'' {{ :redhat:other-redhat:how-to-reset-forgotten-root-password-step2.png?nolink |}} |
| |
| ---- |
| |
| * **Schritt 3** - ''System sysroot mit **RW** remounten, da standartmässig /sysroot beim booten nur ro (Read Only) gemountet wird: -> **mount –oremount,rw /sysroot**'' |
| * **OPTIONAL**: //Mit "''mount | grep root''" Überprüfen, wie /sysroot aktuell gemountet ist:// {{:redhat:other-redhat:how-to-reset-forgotten-root-password-step3.png?nolink|}} <WRAP clear/> |
| * ''Remounten von /sysroot mit **RW Berechtigungen**:''<WRAP clear/> {{:redhat:other-redhat:how-to-reset-forgotten-root-password-step3.2.png?nolink |}} <WRAP clear/> |
| * **OPTIONAL**: //Erneutes Überprüfen, wie /sysroot gemountet ist (Falls man möchte):// {{:redhat:other-redhat:how-to-reset-forgotten-root-password-step3.3.png?nolink|}} <WRAP clear/> |
| |
| ---- |
| |
| * **Schritt 5** - In richtiges Root System wechseln. -> ''<wrap em>chroot /sysroot</wrap>'' |
| * **Schritt 6** - Passwort neu setzen: -> ''<wrap em>passwd root</wrap>'' >> **(Neues PW 2x eingeben)** |
| * **Schritt 7** - **SELinux relabeling** (beim nächsten boot) veranlassen: -> ''<wrap em>touch /.autorelabel</wrap>'' |
| * **Schritt 8** - System neustarten: -> ''<wrap em>exit</wrap>'' -> ''<wrap em>reboot</wrap>'' |
| |
| <wrap em>The root password should be resettet now!</wrap> |
| </WRAP> |
| |
| |
| {{ :redhat:other-redhat:cracked-lock.jpg?nolink&400 |}} |