forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com> Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
58 lines
13 KiB
HTML
58 lines
13 KiB
HTML
<a name="EN-US_TOPIC_0021426802"></a><a name="EN-US_TOPIC_0021426802"></a>
|
|
|
|
<h1 class="topictitle1">Resetting the Password of a Windows ECS by Attaching a System Disk to a Temporary ECS</h1>
|
|
<div id="body1446515843165"><div class="section" id="EN-US_TOPIC_0021426802__section17131859112916"><h4 class="sectiontitle">Scenarios</h4><p id="EN-US_TOPIC_0021426802__p557120821469">You can reset your <span id="EN-US_TOPIC_0021426802__text194419319206">ECS</span> password if:</p>
|
|
<ul id="EN-US_TOPIC_0021426802__ul31424087214650"><li id="EN-US_TOPIC_0021426802__li58960965214655">The password is forgotten.</li><li id="EN-US_TOPIC_0021426802__li1617885210014">The password has expired.</li></ul>
|
|
<p id="EN-US_TOPIC_0021426802__p12543133915467">The method described in this section can only be used to change the password of a local Windows account; it cannot be used to change a domain account password.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0021426802__section1344819634213"><h4 class="sectiontitle">Prerequisites</h4><ul id="EN-US_TOPIC_0021426802__ul3616348111548"><li id="EN-US_TOPIC_0021426802__li173731939172510">A backup has been created for the system disk. For details, see <a href="en-us_topic_0000001128604648.html">Backing Up an ECS</a>.</li><li id="EN-US_TOPIC_0021426802__li50430391215359">A temporary Linux <span id="EN-US_TOPIC_0021426802__text106741032152010">ECS</span> running Ubuntu 14.04 or later is available in the same AZ and has the same CPU architecture as the target <span id="EN-US_TOPIC_0021426802__text175815506155">ECS</span>.</li><li id="EN-US_TOPIC_0021426802__li24310805115411">You have bound an <span id="EN-US_TOPIC_0021426802__text1768405312614">EIP</span> to the temporary <span id="EN-US_TOPIC_0021426802__text8592234172013">ECS</span> and configured the apt-get source.</li><li id="EN-US_TOPIC_0021426802__li32894162215537">You have used either of the following methods to install <strong id="EN-US_TOPIC_0021426802__b208579116916">ntfs-3g</strong> and <strong id="EN-US_TOPIC_0021426802__b3750111514916">chntpw</strong> software packages on the temporary <span id="EN-US_TOPIC_0021426802__text14193143532012">ECS</span>:<p id="EN-US_TOPIC_0021426802__p11942872195216">Method 1:</p>
|
|
<p id="EN-US_TOPIC_0021426802__p16680109195213">Run the following command to install the <strong id="EN-US_TOPIC_0021426802__b655444226143626">ntfs-3g</strong> and <strong id="EN-US_TOPIC_0021426802__b642250819143626">chntpw</strong> software packages:</p>
|
|
<p id="EN-US_TOPIC_0021426802__p8297706215640"><strong id="EN-US_TOPIC_0021426802__b43636294195211">sudo apt-get install ntfs-3g chntpw</strong></p>
|
|
<p id="EN-US_TOPIC_0021426802__p36390052195223">Method 2:</p>
|
|
<p id="EN-US_TOPIC_0021426802__p1448445101313">Download the <strong id="EN-US_TOPIC_0021426802__b550335273211">ntfs-3g</strong> and <strong id="EN-US_TOPIC_0021426802__b17173155519327">chntpw</strong> software packages of the version required by the temporary <span id="EN-US_TOPIC_0021426802__text1974473512204">ECS</span> OS and install them.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0021426802__section1052621215437"><h4 class="sectiontitle">Procedure</h4><ol id="EN-US_TOPIC_0021426802__ol11891624125717"><li id="EN-US_TOPIC_0021426802__li168911724165711">Stop the original ECS and detach the system disk.<ol type="a" id="EN-US_TOPIC_0021426802__ol64363114145227"><li id="EN-US_TOPIC_0021426802__li1151341720102">Log in to the management console.</li><li id="EN-US_TOPIC_0021426802__li464234814566">Click <span><img id="EN-US_TOPIC_0021426802__en-us_topic_0000001825604541_image9499446838" src="en-us_image_0000002188678994.png"></span> in the upper left corner and select a region and project.</li><li id="EN-US_TOPIC_0021426802__li32846719144331">Under <strong id="EN-US_TOPIC_0021426802__b831454315275"><span id="EN-US_TOPIC_0021426802__text1531404392711">Computing</span></strong>, click <strong id="EN-US_TOPIC_0021426802__b153141443122716">Elastic Cloud Server</strong>.</li><li id="EN-US_TOPIC_0021426802__li16925428202157">Stop the original Windows <span id="EN-US_TOPIC_0021426802__text131511138202011">ECS</span>, switch to the ECS details page, and click the <strong id="EN-US_TOPIC_0021426802__b551913512188">Disks</strong> tab.<div class="note" id="EN-US_TOPIC_0021426802__note32654683101914"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0021426802__p25456698101914">Do not forcibly stop the Windows <span id="EN-US_TOPIC_0021426802__text15900121411184">ECS</span>. Otherwise, password reset may fail.</p>
|
|
</div></div>
|
|
</li><li id="EN-US_TOPIC_0021426802__li49674320202157"><a name="EN-US_TOPIC_0021426802__li49674320202157"></a><a name="li49674320202157"></a>Locate the row containing the system disk and click <strong id="EN-US_TOPIC_0021426802__b129721858184120">Detach</strong> to detach the system disk from the ECS.</li></ol>
|
|
</li><li id="EN-US_TOPIC_0021426802__li7881114019576">Attach the system disk to the temporary ECS.<ol type="a" id="EN-US_TOPIC_0021426802__ol774330520859"><li id="EN-US_TOPIC_0021426802__li1035192041616">On the details page of the temporary <span id="EN-US_TOPIC_0021426802__text48384863314">ECS</span>, click the <strong id="EN-US_TOPIC_0021426802__b118314814330">Disks</strong> tab.</li><li id="EN-US_TOPIC_0021426802__li12352182016164"><a name="EN-US_TOPIC_0021426802__li12352182016164"></a><a name="li12352182016164"></a>Click <strong id="EN-US_TOPIC_0021426802__b4385152303414">Attach Disk</strong>. In the displayed dialog box, select the system disk detached in step <a href="#EN-US_TOPIC_0021426802__li49674320202157">1.e</a> and attach it to the temporary ECS.</li><li id="EN-US_TOPIC_0021426802__li1800111611817">Remotely log in to the temporary ECS.</li><li id="EN-US_TOPIC_0021426802__li20334892202157">Run the following command to query the system disk partitions attached to the temporary <span id="EN-US_TOPIC_0021426802__text1391538162013">ECS</span>, so you can identify the directory of the system disk:<p id="EN-US_TOPIC_0021426802__p48796301202157"><strong id="EN-US_TOPIC_0021426802__b48318482201615">fdisk -l</strong></p>
|
|
</li><li id="EN-US_TOPIC_0021426802__li60186269202157">Run the following command to mount the file system of the detached system disk to the temporary <span id="EN-US_TOPIC_0021426802__text445634112010">ECS</span>:<p id="EN-US_TOPIC_0021426802__p53702024202157"><strong id="EN-US_TOPIC_0021426802__b892711320383">mount -t ntfs-3g /dev/</strong><em id="EN-US_TOPIC_0021426802__i109785384"><system-disk-directory></em> <strong id="EN-US_TOPIC_0021426802__b15201297382">/mnt/</strong></p>
|
|
<p id="EN-US_TOPIC_0021426802__p34288713202157">For example, if the queried system disk directory is xvde2, run the following command:</p>
|
|
<p id="EN-US_TOPIC_0021426802__p25922364202157"><strong id="EN-US_TOPIC_0021426802__b33457650195745">mount -t ntfs-3g /dev/xvde2 /mnt/</strong></p>
|
|
<p id="EN-US_TOPIC_0021426802__p17614416321">If the error information below is returned in the command output, the NTFS file systems between the original Windows <span id="EN-US_TOPIC_0021426802__text1666202417418">ECS</span> and the Linux <span id="EN-US_TOPIC_0021426802__text1212113454111">ECS</span> may be inconsistent.</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0021426802__screen5738041498">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.</pre>
|
|
<p id="EN-US_TOPIC_0021426802__p1887312119392">If the file system is inconsistent, back up the disk data first, and run the following command to repair the New Technology File System (NTFS) partition, and then attach the system disk:</p>
|
|
<p id="EN-US_TOPIC_0021426802__p17152203304912"><strong id="EN-US_TOPIC_0021426802__b19152193313496">ntfsfix /dev/</strong><em id="EN-US_TOPIC_0021426802__i79854239398">system-disk-directory</em></p>
|
|
<p id="EN-US_TOPIC_0021426802__p1115263314917">For example, if the queried system disk directory is xvde2, run the following command:</p>
|
|
<p id="EN-US_TOPIC_0021426802__p0152173394910"><strong id="EN-US_TOPIC_0021426802__b1715213364915">ntfsfix /dev/xvde2</strong></p>
|
|
</li></ol>
|
|
</li><li id="EN-US_TOPIC_0021426802__li11815752105716">On the temporary <span id="EN-US_TOPIC_0021426802__text7861922514">ECS</span>, change the password of the specified user and clear the original password.<ol type="a" id="EN-US_TOPIC_0021426802__ol50424782201550"><li id="EN-US_TOPIC_0021426802__li62607680202157">Run the following command to back up the SAM file:<p id="EN-US_TOPIC_0021426802__p26598214202157"><a name="EN-US_TOPIC_0021426802__li62607680202157"></a><a name="li62607680202157"></a><strong id="EN-US_TOPIC_0021426802__b38057335202157">cp /mnt/Windows/System32/config/SAM /mnt/Windows/System32/config/SAM.bak</strong></p>
|
|
</li><li id="EN-US_TOPIC_0021426802__li6971702202157">Run the following command to change the password of the specified user:<p id="EN-US_TOPIC_0021426802__p27836999202157"><a name="EN-US_TOPIC_0021426802__li6971702202157"></a><a name="li6971702202157"></a><strong id="EN-US_TOPIC_0021426802__b49206403202157">chntpw -u</strong> <strong id="EN-US_TOPIC_0021426802__b6247916922234">Administrator /mnt/Windows/System32/config/SAM</strong></p>
|
|
</li><li id="EN-US_TOPIC_0021426802__li38202480202157">Enter <strong id="EN-US_TOPIC_0021426802__b194223527144">1</strong>, <strong id="EN-US_TOPIC_0021426802__b1142214528144">q</strong>, and <strong id="EN-US_TOPIC_0021426802__b3423252181418">y</strong> as prompted, and press <strong id="EN-US_TOPIC_0021426802__b144231952181418">Enter</strong>.<p id="EN-US_TOPIC_0021426802__p7393147202157">The password has been reset if the following information is displayed:</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0021426802__screen4873337622344">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</pre>
|
|
</li></ol>
|
|
</li><li id="EN-US_TOPIC_0021426802__li142801656586">Stop the temporary <span id="EN-US_TOPIC_0021426802__text190442162015">ECS</span>, detach the system disk, and attach the system disk back to the original Windows <span id="EN-US_TOPIC_0021426802__text2017694472113">ECS</span>.<ol type="a" id="EN-US_TOPIC_0021426802__ol3839776920224"><li id="EN-US_TOPIC_0021426802__li5152044202157">Stop the temporary <span id="EN-US_TOPIC_0021426802__text87991434202">ECS</span>, go to the <span id="EN-US_TOPIC_0021426802__text73580442210">ECS</span> details page, and click the <strong id="EN-US_TOPIC_0021426802__b112952071229">Disks</strong> tab.</li><li id="EN-US_TOPIC_0021426802__li46368402202157"><a name="EN-US_TOPIC_0021426802__li46368402202157"></a><a name="li46368402202157"></a>Click <strong id="EN-US_TOPIC_0021426802__b842352706163715">Detach</strong> to detach the system disk temporarily attached in <a href="#EN-US_TOPIC_0021426802__li12352182016164">2.b</a>.</li><li id="EN-US_TOPIC_0021426802__li48376692165527">On the details page of the original Windows <span id="EN-US_TOPIC_0021426802__text9274774373">ECS</span>, click the <strong id="EN-US_TOPIC_0021426802__b027412743720">Disks</strong> tab.</li><li id="EN-US_TOPIC_0021426802__li33256079202157">Click <strong id="EN-US_TOPIC_0021426802__b842352706163842">Attach Disk</strong>. In the displayed dialog box, select the system disk detached in step <a href="#EN-US_TOPIC_0021426802__li46368402202157">4.b</a> and attach it to the original ECS as the system disk.</li></ol>
|
|
</li><li id="EN-US_TOPIC_0021426802__li1373201565812">Start the original Windows <span id="EN-US_TOPIC_0021426802__text223994542019">ECS</span> and set a new login password.<ol type="a" id="EN-US_TOPIC_0021426802__ol39255285195729"><li id="EN-US_TOPIC_0021426802__li9387854202157">Click <strong id="EN-US_TOPIC_0021426802__b842352706112216">Start</strong> to start the original Windows <span id="EN-US_TOPIC_0021426802__text123151210142310">ECS</span>. After the status becomes <strong id="EN-US_TOPIC_0021426802__b842352706112223">Running</strong>, click <strong id="EN-US_TOPIC_0021426802__b842352706112228">Remote Login</strong> in the <strong id="EN-US_TOPIC_0021426802__b842352706112231">Operation</strong> column.</li><li id="EN-US_TOPIC_0021426802__li65750554202157">Click <strong id="EN-US_TOPIC_0021426802__b842352706164129">Start</strong>. Enter <strong id="EN-US_TOPIC_0021426802__b842352706152134">CMD</strong> in the search box and press <strong id="EN-US_TOPIC_0021426802__b842352706152136">Enter</strong>.</li><li id="EN-US_TOPIC_0021426802__li24194619202157">Run the command below to set a new password. The new password must meet the password complexity requirements. For details, see <a href="en-us_topic_0035643949.html">Overview of Password Reset</a>.<p id="EN-US_TOPIC_0021426802__p13607117202157"><strong id="EN-US_TOPIC_0021426802__b5331115091414">net user</strong> <strong id="EN-US_TOPIC_0021426802__b53311150111415">Administrator</strong> <em id="EN-US_TOPIC_0021426802__i1033165019140"><new-password></em></p>
|
|
</li></ol>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0031073513.html">Password Reset</a></div>
|
|
</div>
|
|
</div>
|
|
|