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.
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 lost the root password. The instructions at http://www.psychocats.net/ubuntu/resetpassword are clear until the sentence "In this case, you want the Drop to root shell prompt option so press the Down arrow to get to that option, and then press Enter to select it". Well, what exactly do I type then? Thanks for all help! I am a newbie so I just need step by step - I realize that it is essential to type the exactly correct information. Thanks and kindest regards to everyone!
That tutorial tells you very specifically, so I am not sure if I am missing what you are asking.
Once you arrow down to the root shell prompt option hit the enter key. Type passwd username (for username enter the username that you need to change the password for) hit enter again, and at the prompt type the password you desire. If you are changing the root accounts password just type passwd and hit enter--no username.
This tutorial is specific to Ubuntu. Ubuntu by default does not set a root user password. Instead the default is to give all privileges to the initial user through the use of sudo. If you set a password for root, root can then login. But the general practice in Ubuntu is to not give root a password, and instead use sudo with the initial user account. man sudo for more info on this.
If you are not using Ubuntu then you can go into the boot menu the same way. But instead of choosing recovery mode hit 'e' on the first option. This puts you in edit mode. At the end of the line type 'single' (no quotes), then hit the enter key again. This will put you back at the boot menu with the first option appended with singe, hit 'b' to boot. When you boot you will be in the root shell. Continue with the instructions on the how to you were using. Note that the appended line with 'single' only last for the one session. The next time you reboot you will enter your previous default boot level.
Thanks for the reply. The problem is that I have lost the root or admin password. (When Ubuntu 9.04 was installed on my computer an admin password was selected even though that is not the default for Ubuntu). I can follow psychocat's instructions which brings me to the root shell prompt. BUT, I think that typing in a new word here simply changes the user password which I do not need to do. I posted the same question on Ubuntu forums and I was told I would need to re-install Unbuntu 9.04 and that there is no other way to recover admin password. I am wondering if that is correct because it seems to me that it would be very easy to hack into any Linux system and change the admin password if all you have to do is follow psychocat's instructions which I think are for changing the user password but not the root or admin password. Thanks for any and all help.
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329
Rep:
Quote:
Originally Posted by Darlene
Thanks for the reply. The problem is that I have lost the root or admin password. (When Ubuntu 9.04 was installed on my computer an admin password was selected even though that is not the default for Ubuntu). I can follow psychocat's instructions which brings me to the root shell prompt. BUT, I think that typing in a new word here simply changes the user password which I do not need to do. I posted the same question on Ubuntu forums and I was told I would need to re-install Unbuntu 9.04 and that there is no other way to recover admin password. I am wondering if that is correct because it seems to me that it would be very easy to hack into any Linux system and change the admin password if all you have to do is follow psychocat's instructions which I think are for changing the user password but not the root or admin password. Thanks for any and all help.
Indeed, those instructions are meant to let you set a new root password.
So, what you want is to recover your old root passwd? Almost impossible, actually. AFAIK, and I don't know all the technicalities, but the password it's encrypted using itself as "base", so the only way to decipher your password is: already knowing it! Or, you could try a brute-force password guessing, using programs like Crack or John the Ripper.
If you are at the root shell prompt you are the root user. Therefore running passwd (with no username after it) will change the password for the root user.
Okay, I will go to the "drop to root shell prompt" and summon the courage to type a new root password. Is there any danger, though, that this will make my system unable to boot? (That is what I am most afraid of.) Thanks again for everyone's help and patience.
Well, I tried it. I went to the "drop to root shell prompt" typed "passwd" and then entered a new password. I then exited and let the computer start. But when I tried the sudo command (sudo apt-get updates) in Terminal and also tried to access administration via the GUI neither would accept the new password!
Well, I tried it. I went to the "drop to root shell prompt" typed "passwd" and then entered a new password. I then exited and let the computer start. But when I tried the sudo command (sudo apt-get updates) in Terminal and also tried to access administration via the GUI neither would accept the new password!
I'd suggest reading the Ubuntu documention on sudo and root login:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.