How To Reset A Forgotten Root Password With Knoppix - Page 2

On this page

  1. 3 Links

To see if /dev/sda1 is already mounted, run


As you see from the mount output, it's not mounted, but (as you can find out by running

ls -l /mnt


ls -l /media/sda1

) Knoppix has already prepared the directory /media/sda1 into which we can mount /dev/sda1. We do this now by running:

mount /dev/sda1 /media/sda1

(You might have to adjust this command to your system, e.g. if you have to mount multiple partitions, or if your partitions have different names.)



again, and you should now find /dev/sda1 in the mount output, mounted on /media/sda1:


ls -l /media/sda1

and you should see the files and directories from your root partition.

Now comes the crucial part: we jail ourselves into the /media/sda1 directory so that we cannot see anymore what's outside; we are pretending to be on the regular Linux system instead of on the Live-CD system; this is called chrooting, so the command is:

chroot /media/sda1/

So now that it feels as if we were running the regular Linux system instead of the Knoppix Live-CD, we can use the normal commands from the regular system; to modify or reset a password, this is the passwd command which we use like this:

passwd root

Type in a new password and confirm it - and please try to not forget it again!

Now we can leave our chroot jail:


...and reboot the system:


Remove the Knoppix CD, press ENTER, and boot into your regular Linux system:

If all goes well, you should now be able to log in with your new root password:


Share this page:

0 Comment(s)

Add comment