LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-24-2004, 04:49 PM   #1
feetyouwell
Member
 
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
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,751

Rep: Reputation: 272Reputation: 272Reputation: 272
"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.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 01-24-2004, 05:20 PM   #3
Mugatu
Member
 
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
slackwarefan
Member
 
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
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
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 mandrakeuser.org howto. Note that if you are using the rescue mode, you may need to use vim-minimal rather then vim.
Quote:
Next, run vi /etc/shadow.

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

account_name:password:other stuff e.g.
root:$1$KODLGetc:10979:0:99999:7:::

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
...
Quote:
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.
 
  


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
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


All times are GMT -5. The time now is 07:45 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