Resetting a Lost or Expired Windows Administrator Password

Jerry’s Notes
What’s next?
Published in
1 min readJul 3, 2019

如何重置Windows AMI/instance local administrator密碼?

Picture from https://bluelance.com/

使用情況:

  1. 如果你從別人那得到一個windows AMI但沒有 local Administrator password
  2. 從現在有windows instance轉成新的AMI,想要使用現在AWS的方代去代入新的使用者他自已的public key to local Administrator password mapping

The manual methods to reset the administrator password use either EC2Config or EC2Launch.

  • For Windows AMIs before Windows 2016, use the EC2Config service.
  • For Windows 2016 and later AMIs, use the EC2Launch service.

Step:

Step 1: Verify that the EC2Config service is running

Step 2: Detach the root volume from the instance

Step 3: Attach the volume to a temporary instance

Step 4: Modify the configuration file

!! 這邊的重點是Enable EC2SetPassord !!

\Program Files\Amazon\Ec2ConfigService\Settings\config.xml

Step 5: Restart the original instance

Resetting a Lost or Expired Windows Administrator Password — https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ResettingAdminPassword.html

--

--

Jerry’s Notes
What’s next?

An cloud support engineer focus on troubleshooting with customer reported issue ,and cloud solution architecture.