Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-24-2004, 04:49 PM   #1
Registered: Dec 2003
Location: NC, US
Distribution: Novell Linux Eval (2.6.5)
Posts: 240

Rep: Reputation: 30
forget mandrake 9.1 root password ppc

how can i recover my root password? I tried sudo, but apparently i am not in the sudoers file, so sudo doesn't work either.
can't view / edit passwd, shadow, sudoers
Need help
Old 01-24-2004, 04:57 PM   #2
LQ Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"how can i recover my root password? I tried sudo, but apparently i am not in the sudoers file, so sudo doesn't work either.
can't view / edit passwd, shadow, sudoers
Need help"

Over the years the Linux developers have put a lot of effort into keeping the root password secret. If anyone discovered a way to recover the root password then a patch would be created immediately to fix the problem.

You will have to reinstall.

Be prepared. Create a LifeBoat CD.

Steve Stites
Old 01-24-2004, 05:20 PM   #3
Registered: Dec 2003
Location: VA
Distribution: Ubuntu
Posts: 193

Rep: Reputation: 30
shouldn't there be a way to use a live distro to fix this problem? i've heard people mention using knoppix when they have similar problems, although of course it wouldn't be applicable in this case since he's using a ppc
Old 01-24-2004, 05:55 PM   #4
Registered: Oct 2003
Location: Florida
Distribution: Slackware
Posts: 273

Rep: Reputation: 30
You can use knoppix or another live distro to remove the encryped password from /etc/passwd this only works locally
Old 01-25-2004, 05:14 PM   #5
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Boot up with the first disk and press F1 and enter the option "rescue".
Select the Mount Partititions on /mnt.
At this point, you are the root user.
Change the root dir to /mnt:
chroot /mnt.
Note, If as a normal user, you can run: init 1
this may be quicker.

Now you need to delete the old encripted password from the /etc/shadow entry.
Here is the rest of the instructions copied and pasted from a howto. Note that if you are using the rescue mode, you may need to use vim-minimal rather then vim.
Next, run vi /etc/shadow.

The format of entries in '/etc/shadow' is

account_name:password:other stuff e.g.

The password entry is encrypted, of course.
Delete the password entry for 'root' by moving the cursor to first character of the password (usually the first '$') and typing dw. Now type :wq to save the file.
Reboot with init 6
On the next login, type root for the account name and just hit <ENTER> at the 'password' prompt.

Once you are logged in, type passwd to give 'root' a new password.
I hope this helps.

Last edited by jschiwal; 01-25-2004 at 05:18 PM.


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
Mandrake 10.1 PPC Password failure johnnyLongside Mandriva 2 01-02-2005 07:23 PM
forget password acrors Fedora 1 10-09-2004 01:38 PM
[MySQL] forget password :/ what to do? hunter_one Linux - Software 1 04-12-2004 07:39 AM
forget root password 9.1 RC2 desmond Mandriva 0 09-04-2003 11:26 AM
I forget my password barDo LQ Suggestions & Feedback 1 10-26-2001 06:05 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:46 PM.

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