Sunday, April 6, 2014

Recovering a Locked forgot administrator password for Windows EC2 Instance


Its simple... 
  1. Create a new scratch EC2 instance running 2003 server, and log into it.
  2. Get a note of volume attached to it and Shut down your lost instance (the one you can't log into) from the AWS console.
  3. On the EC2 console, go to Elastic Block Store/Volumes and find the volume you find in step 2 and Detach it.
  4. On that same volume, attach it to your new 2k3 EC2 instance. You can see it appear in Disk Manager and you'll get a new  drive letter.
  5. Go to NewDriveLetter:\Program Files\Amazon\Ec2ConfigService\Settings\ and edit config.xml with notepad
  6. The first setting in the file is for the Ec2SetPassword plugin; change the State field from Disabledto Enabled. Save & close.
  7. On the AWS console, Detach the volume from the new instance
  8. Attach the volume to your original lost instance, as /dev/sda1 (Root volume)
  9. Start the instance. After a few minutes, run the Get Windows Password function which will have the newly generated password.

Now if you have mapped that instance to C-name remember to change the corresponding URL because the ec2-url will change after the restart.

No comments:

Post a Comment