LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-21-2010, 05:30 PM   #1
Darlene
LQ Newbie
 
Registered: Jul 2009
Posts: 10

Rep: Reputation: 0
Lost root password


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!
 
Old 02-21-2010, 06:00 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Posts: 3,366
Blog Entries: 33

Rep: Reputation: 216Reputation: 216Reputation: 216
Type your new password!
 
Old 02-21-2010, 11:53 PM   #3
wit_273
Member
 
Registered: Mar 2007
Location: Nebraska
Distribution: CentOS
Posts: 82

Rep: Reputation: 15
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.

Hope this helps and is not too confusing.
 
Old 02-23-2010, 02:59 PM   #4
Darlene
LQ Newbie
 
Registered: Jul 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Smile RE: Lost root or Admin Password

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.
 
Old 02-23-2010, 03:09 PM   #5
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
Quote:
Originally Posted by Darlene View Post
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.
 
Old 02-23-2010, 03:12 PM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Perhaps I'm missing something here, but anyway..

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.

Evo2.
 
Old 02-23-2010, 03:28 PM   #7
Darlene
LQ Newbie
 
Registered: Jul 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Re Lost Admin root Password

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.
 
Old 02-23-2010, 03:36 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Changing the root password should have no bearing on whether the machine is bootable.

Evo2.
 
Old 02-23-2010, 04:22 PM   #9
Darlene
LQ Newbie
 
Registered: Jul 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Re Lost Root 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!
 
Old 02-23-2010, 04:27 PM   #10
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 4,037

Rep: Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099
Quote:
Originally Posted by Darlene View Post
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:

https://wiki.ubuntu.com/RootSudo

Sudo uses your user password, not your root password.

The document in my link also gives instructions how to lock your root account and return to the Ubuntu security default, should you so desire.

Last edited by snowpine; 02-23-2010 at 05:28 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I lost root password. knockout_artist Linux - Newbie 15 11-30-2007 12:18 AM
Root Password Lost ! gurmeet.bedi Linux - Security 1 10-17-2006 08:01 AM
root password lost odexut7 Fedora 2 01-18-2006 03:18 PM
Lost root password zillah Solaris / OpenSolaris 10 05-24-2005 06:28 PM
Lost root password amirdhagopal SUSE / openSUSE 13 02-10-2005 01:09 AM


All times are GMT -5. The time now is 09:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration