Lost password on a VM on TrueNAS Core - how to enter runlevel 0 in the VM?

I have a jail that I no longer remember the password for. I would like to enter runlevel 0 in vnc and change it there, but I cannot figure out how to get it to do this.

Can’t you iocage console jailname?

What do you mean by a “jail password”?

Duh… I just realized it’s a Debian VM :-/

Would this be the root pressure for the system, or a VNC password?

I’m not aware that you can even set a VNC password so I’m assuming the former.

Correct - root password of the VM. You can control the boot on many VM hypervisors and I’m hoping you can do the same here. If I can get it to boot to GRUB or something similar

Open the VNC console and hit whatever hotkey is used in Grub/Linux while the system boots?

But if I remember correctly Linux expects the root password to login to a shell in single user mode (runlevel 1 - 0 is powered off). If that is indeed the case you could add a CDROM device and boot a live CD, then mount your root filesystem and remove the root password from /etc/shadow.

3 Likes

Standard method to recover “root password” is explained here: