DebianThis forum is for the discussion of Debian Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
.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
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:
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:
It should come up with something like:
It looks like it's already set for read/write permissions, but it's not (just try and reset 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:
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