Forum: 

Recovering lost root password

pier's picture

Hi everyone,

ID = root and the password I had set during 1st use is not opening webmin.

Is there a way to reset it ?

Liraz Siri's picture

You can reset the password on a TurnKey Linux system the same way you reset the root password on any Ubuntu/Debian system:

http://www.debuntu.org/recover-root-password-single-user-mode-and-grub

pier's picture

Tx for your prompt answer ;-)
Actually, this https://help.ubuntu.com/community/LostPassword worked better form me, going to "The Other Way", down the page.
But you definetely set me in the right direction.
Pier
William's picture

I'm unable to ssh into my Amazon hosted Wordpress instance.

Is it possible to reset the password in this environment?

Can I download a backup/image/something and retrieve the data locally?

 

Regards,

William.


Jeremy Davis's picture

But perhaps it is...? I certainly have no idea, and a quick browse of the net suggests it may not be possible, unless of course you set up a key pair (but I'm guessing if you did that then you probably wouldn't be concerned about your root password - because you'd just login with you key and change it).

As for backup, if you set up TKLBAM then you can check your Hub acount for when the last backup was done (if enabled default is a full backup every 30 days, plus optional daily incrementals). You can then launch a new instance with this backup restored to it (via the Hub).

William's picture

Just as a follow up...

  • Created a snapshot of the forgotten instance.
  • Created a volume from that snapshot.
  • Created a new core instance.
  • Attached the above volume to the new core as /dev/sdf1.
  • Start new core.
  • Mount /dev/sdf1.
  • Delete root password from <mount point>/etc/passwd(-) and <mount point>/etc/shadow.
  • Stop core. Detach /dev/sda1 and replace with volume at /dev/sdf1
  • Restart core, login to webmin with root and no password. From user/groups module reset root password.

All done.


bfit's picture

Hello,

 

how can i access grub? when i start my turnkey machine, it will boot up to configuration manager. there ist no way to get into a shell.

Jeremy Davis's picture

If so then a live CD/ISO is the go (read above). Otherwise best to start a new thread. But in the meantime, you can exit out of confconsole to a shell, or SSH in, or use Webshell.

bfit's picture

Yes i can exit the configuration shell to console, but then i have to login... SSH and Webshell works too, but i also have to login with a password i've lost. I'll try with live CD, thanks.

Jeremy Davis's picture

FYI have a look here on how to enter Grub. 

If you want to go the LiveCD route then google turned up this or this video.

bfit's picture

Thanks, i've solved the problem with grub and the ini=/bin/bash command!

Post new comment