Overview
If you have lost the root password for your Pod, you can regain access through the VNC console in the ALYPOD Console. SSH cannot help here — you need local console access.
Before you begin
- Access to the ALYPOD Console.
- Confirmation that you have console access to the Pod (the VNC console works even when SSH does not).
- A snapshot is recommended before you begin, in case you need to roll back.
Steps
- Open the VNC console for your Pod in the ALYPOD Console and log in with any account that still has
sudoaccess. - If you can sudo, simply reset the password:
bash
sudo passwd root
- If you cannot log in at all, reboot the Pod and interrupt the bootloader (usually
EscorShiftat the GRUB menu) to edit the boot entry. - At the end of the
linuxline, addrd.break(RHEL-family) orinit=/bin/bash(Debian/Ubuntu) and boot. - In the recovery shell, remount the filesystem writable and reset the password:
```bash
Debian/Ubuntu
mount -o remount,rw / passwd root
then reboot
exec /sbin/reboot ```
```bash
RHEL-family with rd.break
mount -o remount,rw /sysroot chroot /sysroot passwd root touch /.autorelabel exit reboot ```
- Reboot normally and log in with the new password.
- Immediately afterwards, consider restoring key-only SSH and rotating any credentials that may have been exposed during recovery.
Troubleshooting
- Problem: The filesystem is read-only and
passwdfails. Solution: Remount it read-write first (mount -o remount,rw /ormount -o remount,rw /sysroot). - Problem: SELinux prevents login after a
rd.breakreset. Solution: Create/.autorelabelas shown, which relabels files on the next boot. - Problem: Your account is also locked out. Solution: Use the same recovery shell to reset the account password with
passwd <user>.
Related articles
- [The server will not boot]
- [Hardening SSH]
- [I cannot connect to my Pod via SSH]
