Reset Citrix XenServer 5.x Password

Problem
How to reset root password for Citrix XenServer version 5 and later.

tl;dr
At boot prompt (after BIOS but before the OS kernel loads), type in menu.c32

Select main kernel (xe or xe-serial) and hit Tab to get to boot options. Then replace vga=785 splash with linux single and hit Enter to boot into quiet mode.

Once the system has booted up, you can change the password by using the passwd command:

Type in the new password and confirm it. Finally, reboot the server, and you can login.

Solution

Since Citrix XenServer runs on a Red Hat Linux core, password recovery is very similar to most other Red Hat distros. You need to boot into single/quiet mode, and then do the actual reset via passwd command. To perform the reset, you need either physical access to the server, or a KVM, as it requires pre-boot keyboard input.

Restart the server, and when bios has finished loading, you will see a prompt such as this:

Type in menu.c32 to get to kernel selection screen:

Select one of the default kernels (either xe or xe-serialThen hit Tab to get kernel options. Then, find an option vga=785 splash and replace it with linux single. Hit Enter, and the server will boot into quiet mode.

Once there, you can change the password via the passwd command:

Or, to change the password for a non-root user:

Reboot the server and login.

Author

Vlad Dzhabarov