Computer >> Hướng Dẫn Máy Tính >  >> Kết Nối Mạng >> Kết Nối Mạng

Cách Đặt Lại Mật Khẩu Amazon EC2 Windows Instance Bằng Automation Document

Đôi khi chuyên gia hệ thống cần đặt lại mật khẩu AWS EC2 instance. Bài viết hướng dẫn reset qua Automation Document, cũng có bài reset qua System Manager (đọc tại đây).

Khi thực thi automation document AWSSupport-ResetAccess, nó thực hiện các bước sau để reset mật khẩu Windows:

  • Tạo và cấu hình VPC
  • Tạo subnet
  • Khởi chạy Windows Server helper instance
  • Dừng instance mục tiêu, tạo backup
  • Gán volume root của instance mục tiêu vào helper instance
  • Dùng Run Command chạy EC2Rescue trên helper instance
  • Gán lại volume root và khởi động lại instance mục tiêu
  • Dọn dẹp tài nguyên tạm, trừ backup AMI

Quy trình gồm 2 bước: thu thập Instance ID và thực thi automation document.

Bước 1: Thu Thập Instance ID

Bước 1 thu thập Instance ID từ instance EC2 không truy cập được do quên mật khẩu.

  1. Đăng nhập AWS Management Tools
  2. Nhấn Services chọn EC2
  3. Nhấn Running instances
  4. Chọn instance nhấn tab Description
  5. Copy Instance ID vào clipboard. Ví dụ: i-07df312d5e15670a5. Cần Instance ID này cho automation document bước 2.Cách Đặt Lại Mật Khẩu Amazon EC2 Windows Instance Bằng Automation Document

 

Bước 2: Thực Thi Automation Document AWSSupport-ResetAccess

Bước 2 tạo automation document kích hoạt lệnh AWSSupport-ResetAccess reset mật khẩu Windows.

  1. Nhấn Services tìm AWS Systems Manager. Mở khi tìm thấy.Cách Đặt Lại Mật Khẩu Amazon EC2 Windows Instance Bằng Automation Document
  2. Bên trái cửa sổ, nhấn Automation dưới Action & Change
  3. Nhấn Execute automation
  4. Gõ AWSSupport-ResetAccess dưới Automation document
  5. Nhấn automation document AWSSupport-ResetAccess chọn NextCách Đặt Lại Mật Khẩu Amazon EC2 Windows Instance Bằng Automation Document
  6. Chọn Simple execution
  7. Nhập instance id dưới Input Parameters > InstanceId như ảnhCách Đặt Lại Mật Khẩu Amazon EC2 Windows Instance Bằng Automation Document
  8. Nhấn Execute. Tiến trình hiển thị dưới Execution status.Cách Đặt Lại Mật Khẩu Amazon EC2 Windows Instance Bằng Automation Document
  9. Nhấn Automation dưới Action & Change xem execution IDCách Đặt Lại Mật Khẩu Amazon EC2 Windows Instance Bằng Automation Document
  10. Khi thực thi thành công, hiển thị dưới Status. Execution ID f079e28c-ffb3-4de2-83e4-fb2c5974f431 thực thi thành công.Cách Đặt Lại Mật Khẩu Amazon EC2 Windows Instance Bằng Automation Document
  11. Nhấn Execution ID truy cập mật khẩu
  12. Mở rộng Outputs xem thông tin mật khẩu mới.