Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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'm new to linux and have downloaded debian, as it was recommended to me.
I have forgotten my root password!!! I have tried to get in to single user mode but that still requires a passwd. I googled my prob and found this page http://www.debianhelp.co.uk/root.htm
Hmm.. single user mode shouldn't ask for a password. Anyway, as an alternative: If you have a live cd nearby, boot in with it, mount and chroot into your harddisk's root partition and change the password. i.e, once you've logged in with the live cd, open a terminal and type:
Code:
mkdir /tmp/scrap
mount /dev/hda1 /tmp/scrap (replace hda1 with sda1 or with wherever your / partition is installed)
chroot /tmp/scrap
passwd
After your done, type exit and umount /tmp/scrap and reboot normally without the live cd.
I've not tried this, I usually use chroot just to make lilo changes, so someone please correct me if this won't work.
Can you use the sudo command? (That one asks for your password to run a command as root.) If you can, you can do a sudo passwd root to reset the "root" password. (I just installed Kubuntu 7.10 on one of my computers, and it was easier to do that than to search for whatever default root password was used by the installer -- which doesn't ask for a root password. I mention this since Ubuntu is Debian based, and sudo was automatically set up by the install, and so I thought it might also be done in a real Debian installation.)
As to the instructions you referenced, they should have worked if you followed them exactly. Any "Linux Rescue CD" should enable you to reset the root password following those instructions.
Notice that there is a difference between su - and sudo. su will ask for the root password and continue to behave as root until you exit. sudo asks for YOUR password and acts as root just for one command.
Did you try the command exactly as I typed it in my prior post: sudo passwd root ? You should have seen something like this:
Code:
$ sudo passwd root
Password:
Changing password for user root.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
(Note that the response to the first "Password:" prompt is your password.)
Also, the response you noted suggests that the root password has, in fact, been deleted. Try booting in single-user mode again -- you may not now need a password.
... (I just installed Kubuntu 7.10 on one of my computers, and it was easier to do that than to search for whatever default root password was used by the installer ...
A bit off topic:
You will search forever as the root account is locked (see man passwd, -l option)
You will search forever as the root account is locked (see man passwd, -l option)
Strange. I believe that I can now log in a root with no problem on Kubuntu. I guess the password was unlocked by my usage of the passwd command, eh?
Edit: OK, now I'm on the Kubuntu 7.10 distribution, and su - worked just fine (using the password I'd entered.) So it seems that my use of sudo to set the password undid any lock that was set.
Last edited by PTrenholme; 10-29-2007 at 04:57 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.