- 1 Hyper-V 2012 R2: Pros and Cons of Generation 1 vs. Generation 2 VMs
- 2 Harnessing the Power of Hyper-V Network Virtual Switches
- 3 Working with SSH and Secure FTP Servers in Windows
- 4 Discover Windows 8's Hidden Server Features
- 5 Server Virtualization Customer Reviews: VMware, Hyper-V, XenServer and More
Rescuing a Lost Root Password
Sometimes you wind up taking over a machine for which the root password has been lost. Here are a couple of solutions.Tip of the Trade: Ever take over a machine for which the root password has been lost? Here are three possible ways to get the information you need to be up and running.
- Reboot (hard reboot by pulling the power cable if rebooting requires the root password), and hit 'e' to edit the boot line when you get to the grub menu. Scroll down to the line that starts with kernel, then hit 'e' again to edit it, add 'single' to the end, and hit Enter to accept. Now 'b' to boot and eventually you'll be dumped into a root shell. From here type passwd to change the root password.
- Some systems require the root password to boot into 'single' mode.
In this case, try editing the grub boot line
to add 'init=/bin/bash' to the end of the kernel line.
This will boot you into a very basic system, using the bash shell
instead of init. You may have to mount the root partition read/write:
mount -no remount,rw /
- If grub is protected, try booting from a LiveCD or USB stick. Open a
root shell, and use fdisk -l to show the available disk
partitions. Mount the root partition with
mount -o,rw /dev/hda1 /mntCheck it's the right directory with ls /mnt, then change into that as your root directory:
chroot /mntNow use passwd as before.
NOTE: It's important to bear in mind that all of these are also potential security risks if people have physical access to your machines.