How To: Recover the Linux root password
This document (3003803) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 10
SUSE Linux Enterprise Server 9
SUSE Linux Enterprise Server 8
Situation
Resolution
- Boot server from the installation CD.
- Then select any installation method or Rescue System.
- At the first installation screen when selecting
language, press ctrl-alt-f2 to open a virtual console.
Note: If you selected Rescue System, select your keyboard language and then a Rescue Login prompt should appear. Login as root.
- Typefdisk -lto list the partitions. Locate the Linux root partition.
- Typemount /dev/sda4 /mnt(replace sda4 with the device name for the Linux root partition identified in the previous step).
- Runmount -o bind /dev /mnt/devto make the device files available (this is needed for access to the urandom device which may be used by the passwd command below).
- Enterchroot /mnt
- Now enterpasswd rootand reset the root password.
- Typeexitto leave the chroot environment.
- Reboot the system.
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:3003803
- Creation Date: 18-Jan-2007
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com