Computerbank Victoria document repository

printer envelope
Home / Support / How to: Resetting your root password using Lilo

How to: Resetting your root password using Lilo

How to reset your root password if we or you cant work out what it is.

Author: Kylie Davies, advice by Grant Diffey

Date Released: 20/11/2002

Abstract

This document is intended to be a step by step guide to resetting a root password. To do this we need to pass some special boot parameters before Linux loads. This is done at the LILO prompt. LILO is the boot loader and it makes the computer load linux.

How to reset the root password

As LILO appears it is important to press the shift key so that LILO does not boot linux.

Once the shift key is pressed you will see the following:

boot:

This is where we enter the following command:

linux init=/bin/sh

Once linux has booted you will be presented with a hash prompt (#), It is at this point that you need to enter the following: (Note: There is no space between the remount,rw part of the command).

mount -o remount,rw /

At this point you will get your # prompt back and you need to reset the root password. To do this we type:

passwd

You will now be prompted to enter a new password for the root user. You will need to do this twice as there is a confirmation process in setting passwords. Please write down your new root password in a secure place and if possible advise Computerbank what this is.

After you have set the root password it is important to type the following twice:

sync (press enter)

sync (press enter)

After you have doen this you will then need to hold down the ALT, and Print Screen/Sys Req with one hand and with the other hand press the S key, the U key and the B key. The S option syncs the disk, the U option unmounts the disk and the B option reboots the system.

If your system fails to reboot you can just turn it off at the power switch. Once your computer comes up again the root password will be reset to whatever you set it as.

Computerbank Victoria Inc., 483 Victoria St, West Melbourne, Victoria, Australia. 3003

© Computerbank Victoria Inc. GNU Free Documentation License - copying and distribution of Computerbank documentation is permitted in any medium, ONLY if this notice is preserved.