Lost root password during upgrade to 8.0.4

Asked by Sasha

After upgrading to Ubuntu 8.0.4 I find that my old root password does not work.
What can I do ?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Juraj Lukac
Solved:
Last query:
Last reply:
Revision history for this message
Best Juraj Lukac (hrasko) said :
#1

You could boot from live CD and edit your /etc/sudoers config file to add your user to the sudoers list. Then boot again from hard drive and try to set new root password.
You can also use chroot when booted from live CD and change you root password.
The third way is to edit directly the /etc/shadow file when booted from live CD and set the same password for root the same as your user has or delete the password for root.

I think the most confortable is boot from live CD, mount the root partition from hard drive for example to /mnt/disc and use "chroot /mnt/disc" and then "passwd" and change your root password. Tha last step is reboot. I would do it like this;)

Hope this helps.

Revision history for this message
Sasha (yossi) said :
#2

Thanks Juraj Lukac, that solved my question.

Revision history for this message
Sasha (yossi) said :
#3

Many thanks for taking the time to answer my question.
Sasha