KB Article #101002

How to reset the root OS password of a ST appliance

How to reset the root OS password of a ST appliance

Issue

The root OS password has been forgotten and needs to be recovered or reset.

Solution

The root OS password can't be recovered, at least not in a time-effective way. However, it could be reset very quickly following the procedure bellow.

  1. Prepare a USB flash drive or a USB CD-ROM drive.
  2. Load a bootable Linux image to the media prepared in step [1].
  3. Attach a monitor and a keyboard to the box.
  4. Enter the BIOS and set it to firstly attempt to boot from Removable media:
    1. Reboot the box. When it comes up start hitting the Del key until entering the BIOS.
    2. Set Boot Sequence so that the first boot device is Removable drive.
    3. Save and exit BIOS.
  5. Mount the drive containing the root partition (/dev/sda6 on 4500 appliances, /dev/sda7 on 5200 appliances) to a given mount point, /mnt in this case.
  6. Edit the /mnt/etc/passwd file:
    1. The first line should be something like this: root:x:0:0:root:/root:/bin/bash
    2. Delete the "x". Save and exit.
  7. Reboot. Remember to disconnect the USB media prior to rebooting.
  8. Login as root. The system should accept the login without prompting for a password.
  9. Use a text editor to open the /etc/passwd file and add the "x" deleted in step [6b].
  10. Issue passwd and enter the new root password.