Difference between revisions of "Root Password Reset"
From PrgmrWiki
Line 4: | Line 4: | ||
<li>If the vps (domain) is still running, shut it down using the [[Management Console]]. | <li>If the vps (domain) is still running, shut it down using the [[Management Console]]. | ||
<pre> | <pre> | ||
− | Name ID Mem VCPUs | + | Name ID Mem VCPUs State Time(s) |
− | + | cnrylefanu 159 256 1 -b---- 131.6 | |
+ | |||
+ | Wiki at http://wiki.prgmr.com | ||
+ | Please contact support@prgmr.com with any issues accessing your machine. | ||
+ | |||
+ | Options for "cnrylefanu" | ||
+ | 1. out of band console (press ctrl-] to escape, not resizeable) | ||
+ | 2. create/start, opens OOB console (try this if the machine is not running) | ||
+ | 3. shutdown (requests operating system to shut down) | ||
+ | 4. force power off (destroy/hard shutdown) | ||
+ | 5. reboot (requests operating system to reboot) | ||
+ | 6. swap i386/amd64 bootloaders currently "amd64" | ||
+ | 7. view/add/remove ssh authorized_keys | ||
+ | 8. set reverse dns | ||
+ | 9. swap pvgrub/grub2 bootloaders currently "pv-grub" | ||
+ | |||
+ | 0. exit | ||
+ | enter selection> 3 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</pre> This will signal the domain to safely shutdown like the shutdown command.</li> | </pre> This will signal the domain to safely shutdown like the shutdown command.</li> | ||
<li>When it is stopped running, opening the menu will say | <li>When it is stopped running, opening the menu will say |
Revision as of 04:39, 11 March 2016
The prgmr.com rescue image can be used to reset the root password for the vps similar to a rescue disk like tomsrtbt or the debian installer rescue mode. If you run netbsd, you can also boot the netbsd installer from the rescue disk for a similar process.
- If the vps (domain) is still running, shut it down using the Management Console.
Name ID Mem VCPUs State Time(s) cnrylefanu 159 256 1 -b---- 131.6 Wiki at http://wiki.prgmr.com Please contact support@prgmr.com with any issues accessing your machine. Options for "cnrylefanu" 1. out of band console (press ctrl-] to escape, not resizeable) 2. create/start, opens OOB console (try this if the machine is not running) 3. shutdown (requests operating system to shut down) 4. force power off (destroy/hard shutdown) 5. reboot (requests operating system to reboot) 6. swap i386/amd64 bootloaders currently "amd64" 7. view/add/remove ssh authorized_keys 8. set reverse dns 9. swap pvgrub/grub2 bootloaders currently "pv-grub" 0. exit enter selection> 3
This will signal the domain to safely shutdown like the shutdown command. - When it is stopped running, opening the menu will say
Error: Domain 'build' does not exist.
which is normal, it just means the vps isn't running. Choose create to start the vps:Error: Domain 'build' does not exist. Options for build 1. out of band console (press ctrl-] to escape, not resizeable) 2. create/start (try this if the vps "does not exist") 3. shutdown 4. destroy/hard shutdown 5. reboot 6. swap i386/amd64 bootloaders (pvgrub) currently i386 7. view/add/remove ssh authorized_keys 8. set reverse dns 9. exit press the number> 2
The domain will start booting with pvgrub and will load the grub menu from the rescue image:
GNU GRUB version 0.97 (1048576K lower / 0K upper memory) +-------------------------------------------------------------------------+ | user bootloader configuration | | CentOS 5.5 rescue (2.6.18-194.3.1.el5xen) | | CentOS 5.5 installer | | Ubuntu 10.04 LTS installer | | | | | | | | | | | | | | | | | +-------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, 'e' to edit the commands before booting, or 'c' for a command-line.
- Choose CentOS rescue to boot the read only rescue image. When it is finished booting, login as root at the prompt with no password:
CentOS release 5.4 (Final) Kernel 2.6.18-164.6.1.el5xen on an x86_64 build.xen.prgmr.com login: root [root@build ~]#
- Mount your root filesystem (by default /dev/xvda1) and chroot to it:
[root@build ~]# mount /dev/xvda1 /mnt [root@build ~]# chroot /mnt build:/#
- Change the root password with passwd:
build:/# passwd Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully build:/#
- Exit, unmount, and shutdown:
build:/# exit exit [root@build ~]# umount /mnt [root@build ~]# shutdown -h now Broadcast message from root (xvc0) (Tue Jan 26 15:33:15 2010): The system is going down for system halt NOW! INIT: Switching to runlevel: 0 INIT: Sending processes the TERM signal
- Start the domain again as in step 2, but let it load the "user bootloader configuration" instead of choosing the rescue image.