Help File Library: Bailing Out of Password Trouble with tomsrtbt
Written By: Willis (sonic.tooth@verizon.net)
So you just installed your brand-spanking new Linux system with the newest kernel, etc..
The installer asks you to create a root password--first you try your dog's name, and the system rejects it as being too insecure, so you sit down and pick eight random letters and numbers and punch them in.
Congratulations you have a new root password! Which you will promptly forget. Now your new Linux system has become an intelligent start up program.
Or, say you accidentally set your run level to 0 or set the wrong vga text buffer; both of these would render your system either inoperable or very hard to use.
That's where a boot and root disk comes in handy. Specifically, Tomsrtbt.
This disk fits more then any other rescue disk in the world on it. You can boot into your system and change anything without having to login, or go through the boot up process, either of which could be the problem preventing you from using your system.
In this Help File I will show you how to create this disk in both Windows and Linux and how to use it to fix two common problems.
First you have to go to the website and download the software; you want either the tar.gz (for installation on a Linux system) or the .zip one (for installation on a DOS or Windows computer). We're going to concentrate on the Linux side of this software utility.
Installing it in Linux is not diffcult. One thing to note is that when I make a reference to [tomsrtbt version] I am referring to the file you just downloaded, as the version numbers and file names can change.
-
gunzip [tomsrtbt version].tar.gz
That will unzip the file.
-
tar -zxf [tomsrtbt version].tar
That will extract the files to a new directory called [tomsrtbt version]
For a fast method try tar -zxvf [tomsrtbt version].tar.gz but I can't guarantee that will work
- Go into the new directory
cd [tomsrtbt version]
- Then change your user to root using
su and then your root password when it asks for it
- Type
./install.s
It will prompt you for a blank floppy stick one in the drive and it will copy all the files to it and make it bootable.
Now you're finished with the installation. With your new tomsrtbt disk you can fix all kinds of problems.
You Forgot Your Root Password
- Try to remember
- Insert your tomrtbt disk and boot up your machine
- If it boots to your Linux system then go into your BIOS and set it to boot to "a:" first. You can access your BIOS control panel on the startup, when it says something like "Press DEL for setup"
- Watch as tomsrtbt loads it self (may take some time)
- Login as root (it will tell you the password)
- Now to mount your Linux system, type
vi /etc/fstab
- Add a line at the very bottom by pressing INS or "I" that reads
/dev/hd(drive letter and partition number) /linux auto defaults 0 0
For example:
/dev/hda1 /linux auto defaults 0 0
- Press ESC and then type
:wq
and Enter.
- Now type
mount /linux
- Hopefully if you type
cd /linux
you should be in your computer
- Now type
vi /linux/etc/passwd
- Go to the part where it says
root:(some stuff). Press x on the characters after the root: prompt until it is gone and then type
:wq
- Now reboot and you can login as root with no password
- DON'T FORGET TO EDIT /etc/passwd again and put something back into the password file if there is still nothing after
root:.
You Set init Level to 0
- Do everything up to step 10 in the previous section.
- Type
vi /etc/initab
- Scroll down to where it says
id:0(or 6):initdefault:.
- Change the
0 or 6 to another number. Read right above this line for the descriptions of the numbers.
- Type
:wq
reboot and you're done.
If your computer keeps booting into tomsrtbt every time you reboot, take the disk out of the drive and then reboot. tomsrtbt loads itself into RAM so you can take the disk out after you initially login.