I have a Public Cloud instance via OVH. I reinstalled my computer without backing up my ssh-key. I also forgot the root password for the server. I do have access to my Public Cloud control panel and rebooted with rescue mode.
However, when I change my root password (via the noVNC console) and then reboot to my Ubuntu disk, the new password is incorrect.
The passwd
command returns: passwd: password updated successfully!
.
But then I can't login as root with the new password after exiting rescue mode.
What am I doing wrong?:
When you are in rescue mode and you change the password with
passwd
, you change the password for the rescue mode only !If you want to change you "normal OS" password from the rescue mode, you first need to
chroot
into the partition holding your "normal OS" and then usepasswd
there to change your password:More details in the official doc