Jump to content

Root password problem


Guest Belgarion
 Share

Recommended Posts

Guest Belgarion

Hello,

 

I have very big problem with the "root" user and password.

I've lost my root password yesterday (my last connection as root was 6 months ago) and I try to follow a how-to to recover it :

 

boot in "linux single"

delete line "root" in etc/passwd

delete line "root" in etc/shadow

 

enter passwd to set new root password.

 

BUT when I try "passwd" the system answer "can not identify you" :wall:

and when I try "passwd root" it says "unknown root user" :wall:

 

Now when I reboot my system I no longer have root user I can't do "su root" it says "unknown root user" (and I also have to start Xserver by log in and enter startx, I no longer have graphic mode to log in)

 

I've downloaded the mandrake 10.0 ... (mdk 9.2 now)

Do you think that if I try to upgrade my system it will recover these problems without losing users datas ???

 

thanks a lot for your help

 

:end:

Link to comment
Share on other sites

Welcome.

 

Never had to do this, but from what i remember readinging somewhere, try this.

Boot into a consol and type

linux single

then enter. Then type

 passwd root

press enter.

It then (i think) asks for your new password. enter it and then reboot.

Link to comment
Share on other sites

I'm interested to hear if anon's recovery-method works, but if it doesn't ...

 

*I'm not sure, but I don't think you had to delete the complete root-line .. now you don't have a root-user anymore. Add it again. You can use the command "adduser" for this.

 

you can also start using "linux init=/bin/bash".

 

*Not sure if an upgrade will help ... since I suppose that it doersn't touches your user-configuration. I don't think it's needed anyway.

 

*If the above fails .. try to use a bootable cd like knoppix and change add the users from there if possible ... (I suppose so). You could try this then:

 

Mount your real root-partition. Execute the chroot-command to make your real rot-partition the root instead othe knoppix one. execute the useradd-command : you'll maybe have to specify the absolute path (/sbin/useradd or something like that), but I sdon't think this will be necessary.

 

That's it I suppose ... Check if /etc/passwd, ... contain your new user root.

With usermod, you can change data about users.

 

Hopes this helps.

Edited by Michel
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...