Chapter 4 . Booting the System 133 As an example of using the SUSE Rescue System, we will take the case of a forgotten root password and reset this with the Rescue System. Caution Some of you might see a large security problem with what we are about to do. If malicious users have physical access to a server, they are quite able to reset the root password of the machine using this method. This is why the physical security of a machine is as important as the security of the machine from an operational standpoint. To reset the root password from the SUSE Rescue System, follow these steps: 1. When the Rescue System has loaded, you will be prompted to select the keyboard map that you are using (which defines the type of keyboard that you are using). After the kernel executes, loads the initial ramdisk, and starts various system processes, you will then be asked to log in. Just enter root as the username, and you will be dropped into the Linux system from the initial ramdisk. 2. At this point, you need to identify the partition that contains /etc. This will usually be your / (root) partition. Mount the partition under /mnt. The following example uses /dev/hda3as the root partition: mount /dev/hda3 /mnt 3. When mounted, you need to edit the file /mnt/etc/shadow to reset the root password. You can edit this file using any text editor, although vi is the only screen-oriented text editor that is provided in the SUSE Rescue System. Remember that you mounted your system s root partition under /mnt; which is why the location of the /etc/shadow file has changed. The shadow file is a system file that contains encrypted passwords of the users on the system. The file can be read and written to only by the root superuser. 4. When loaded, you need to find the entry for the root user. Find the encrypted password, which is the second field (fields in the file are separated by a colon). When found, delete the password so that there are just two colons next to each other (::), and save the file. 5. After the file has been edited, change the directory to / (root) and unmount the filesystem by issuing the following: umount /mnt 6. When unmounted, you can reboot the system by typing reboot and pressing the Enter key, or just pressing the reboot key on the machine. Remember to remove your optical media as the system reboots, or you may accidentally boot from it. Note
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.