LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   forget mandrake 9.1 root password ppc (https://www.linuxquestions.org/questions/linux-software-2/forget-mandrake-9-1-root-password-ppc-138209/)

feetyouwell 01-24-2004 03:49 PM

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

jailbait 01-24-2004 03:57 PM

"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

Mugatu 01-24-2004 04:20 PM

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

slackwarefan 01-24-2004 04:55 PM

You can use knoppix or another live distro to remove the encryped password from /etc/passwd this only works locally

jschiwal 01-25-2004 04:14 PM

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.


All times are GMT -5. The time now is 07:40 AM.