You can reset your ECS password if:
The method described in this section can only be used to change the password of a local Windows account, but not the password of a domain account.
Method 1:
Run the following command to install the ntfs-3g and chntpw software packages:
sudo apt-get install ntfs-3g chntpw
Method 2:
Download the ntfs-3g and chntpw software packages of the version required by the temporary ECS OS.
Do not forcibly stop the Windows ECS. Otherwise, password reset may fail.
fdisk -l
mount -t ntfs-3g /dev/Result obtained in step 2.a /mnt/
For example, if the result obtained in step 2.a is xvde2, run the following command:
mount -t ntfs-3g /dev/xvde2 /mnt/
If the following error information is displayed after the preceding command is executed, the NTFS file systems may be inconsistent. In such a case, rectify the file system inconsistency.
The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/xvde2': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.
Back up the disk data, run the following command to rectify the NTFS file system inconsistency, and attach the system disk:
ntfsfix /dev/Result obtained in step 2.a
For example, if the result obtained in step 2.a is xvde2, run the following command:
ntfsfix /dev/xvde2
cp /mnt/Windows/System32/config/SAM /mnt/Windows/System32/config/SAM.bak
The password has been reset if the following information is displayed:
Select: [q] > 1 Password cleared! Select: [q] > q Hives that have changed: #Name 0<SAM> Write hive files? (y/n) [n] : y 0<SAM> - OK
net user Administrator New password
Parameter |
Requirement |
Example Value |
---|---|---|
Password |
|
YNbUwp!dUc9MClnv NOTE:
The example password is generated randomly. Do not use it. |