DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a debian box with important application running on it ,i don't know what the root password is ,the guy who knew has left and did not bother to pass on information.I have heard theres a program one can run ..just pop in a cd and follwo instruction to reset the root password.
thanks
.just pop in a cd and follwo instruction to reset the root password.
Yes, sort of. The "program" is named Knoppix. Get yourself a CD with it, "pop it in" then do:
-open up a Terminal (it's on the down-left side of the screen, on the taskbar, an image shaped as a black monitor)
-type 'su' - without quotes
Here's the most "difficult" part. You must know which harddrive (and which partition) holds your Debian install. I'll assume it's hda1 (might be as well hdb3, hda2, etc.)
-type 'mount -t ext3 /dev/hda1 /mnt/hda1'
-type 'chroot /mnt/hda1 /bin/bash'
-type 'passwd root'
-type in twice the new password
-type 'exit' twice
-reboot.
LEGEND:
Commands are set in red.
Display views are set in green.
I had to do this on Ubuntu today and here is what I did:
- Restart you computer and wait for GRUB. You may have to press the 'esc' to pick from a list of kernels. When you get to the list pick one and type 'e' to edit it. Another list will show up. Scroll down and pick from the list something that looks like this (or something similar):
kernel /vmlinuz-x.x.x-x.x ro root=/dev/blah/
Type 'e' again to edit this line. Make sure that you press the space bar and add the following:
init=/bin/bash
Then press enter. The line should look something like this then:
Press 'b' to boot. This will take you into a bash terminal. From there you'll have to mount your hard drive and allow for read/write pernissions. First you have to see the name of the mount. This is done by typing this command:
# mount
It should come up with something like:
/dev/hda1 (rw)
It looks like it's already set for read/write permissions, but it's not (just try andreset the password with the passwd command and see what happens). To mount it again type the following command:
# mount -o remount,rw /dev/hda1 /
Now you should be able to change the root password by issuing the following command:
# passwd
Type in the new password two times and the authentication tokens will be updated. Then restart the computer by typing the 'reboot' command. That's it. Hopefully this works for everyone. I have successfully done this with Ubuntu, Red Hat 8,9, and all of the Fedora Core distributions.
For any form (that I know) of Unix/Linux:
- start a Unix/Linux OS from floppy or cd (Gentoo has a fine minimal install cd with editor)
- mount the partition with the /etc directory
- edit either the password or the shadow file
- in case of the shadow file remove all data (looks like garbage) between the first and the second semicolon
- you now have an empty password!
that is why any fysical access to any Unix/Linux Computer/server must be restricted!
It is of coarse important to make a backup of any systemfile before you alter it eg:
cp shadow shadow.bck
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.