Resetting Root Password and Relabeling with SElinux on Linux Systems on SLE Micro
This document (000021384) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Micro 5.5
SUSE Linux Enterprise Micro 6
Situation
Resolution
For SLE Micro 5.5 or SLE Micro 6 do:
1. Boot (or reboot) the system.
2. While the Grub menu is displayed, move the cursor to the intended boot entry (usually the first one) and press "E" to edit.
3. Locate the line beginning with the word "linux", and append "systemd.debug-shell=1" to the end of the line as additional kernel command line arguments.
---snip---
echo "Loading Linux...
linux
---snap---
4. Press Ctrl-X (or F10) and allow the system to boot to the shell prompt.
5. Switch to Console 9 (CTRL-ALT-F9), where a root shell is available.
6. Enter "passwd" and press Enter, then input a new password twice.
7. Switch to Console 1 (CTRL-ALT-F1). Login as root with new password.
8. To remove the debug console, run "reboot" or stop the debug-shell service "systemctl stop debug-shell.service".
Alternative methods of accomplishing the same task.
For SLE Micro 5.5 do:
1. Boot (or reboot) the system.
2. While the Grub menu is displayed, move the cursor to the intended boot entry (usually the first one) and press "E" to edit.
3. Locate the line beginning with the word "linux", and append "init=/bin/bash autorelabel=1" to the end of the line as additional kernel command line arguments.
4. Press Ctrl-X (or F10) and allow the system to boot to the shell prompt.
5. Enter "passwd" and press Enter, then input a new password twice.
6. Type "exec /sbin/init" after the shell prompt and press Enter. This will proceed the system to boot to the login prompt.
7. Login as root with the new password.
8. Run "restorecon -v /etc/shadow".
9. Reboot the system "reboot".
10. login as root with the new password.
For SLE Micro 6 do:
1. Boot (or reboot) the system.
2. While the Grub menu is displayed, move the cursor to the intended boot entry (usually the first one) and press "E" to edit.
3. Locate the line beginning with the word "linux", and append "init=/bin/bash" to the end of the line as additional kernel command line arguments.
4. Press Ctrl-X (or F10) and allow the system to boot to the shell prompt.
5. Enter "passwd" and press Enter, then input a new password twice.
6. Then run "sync" to make sure that the changes are written to disk.
7. Reboot the system again "reboot".
8. While the Grub menu is displayed, move the cursor to the intended boot entry (usually the first one) and press "E" to edit.
9. Locate the line beginning with the word "linux", and append "enforcing=0" to the end of the line as additional kernel command line arguments.
10. Press Ctrl-X (or F10) and allow the system to boot to the shell prompt.
11. Login as root with the new password.
12. Run "restorecon -v /etc/shadow"
13. Final reboot for the system "reboot".
14. login as root with the new password.
Additional Information
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021384
- Creation Date: 04-Mar-2024
- Modified Date:07-Nov-2024
-
- SUSE Linux Enterprise Micro
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com