Modify the Linux system login password by mounting a disk on Windows Azure

Source: Internet
Author: User

When it comes to VM password issues on Windows Azure, our first two articles have described how to reset the login account password for Windows VMS, Linux VMS on Windows Azure. Today, in addition to the above two methods, there is a way to retrieve the password. specifically see below:

First, click on the virtual machine-the dashboard, record the disk name, delete the original virtual machine a retains its disk

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/54/32/wKioL1R77oHjB5rnAADFwyDW4Ak162.jpg "height=" 328 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/54/32/wKioL1R77oGgbVeiAABsr92ep6A030.jpg "height=" 158 "/>

Second, create a new virtual machine in the original cloud service or use an existing virtual machine B to get root privileges

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/54/32/wKioL1R77oKCicgDAACJEY7131U029.jpg "height=" 186 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/54/32/wKioL1R77oLzOehvAADXDLsH6vg310.jpg "height=" 194 "/>

Mount the disk of virtual machine A as a data disk to B

(It may take several minutes to wait for background synchronization after deleting virtual machine a)

3.1 Select additional---additional disks

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/54/32/wKioL1R77oKy36XeAABpTgP5FJA301.jpg "height=" 144 "/>

3.2 Select A's disk in the list, do not enable caching

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/54/32/wKioL1R77oLAPatwAACv-UlX23A961.jpg "height=" 361 "/>

3.3 Scan the new disk and mount it, such as/tempmount

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/54/32/wKioL1R77oKiH4m8AAEZdKpM_vU059.jpg "height=" 186 "/>

Iv. change the password by changing the passwd and shadow files

4-1 back up the passwd and shadow files in the two disks:

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/54/32/wKioL1R77oKw4M-CAADFFP37fFY495.jpg "height="/>

4-2 Copy the passwd and shadow files from the virtual machine a disk to the current virtual machine:

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/54/33/wKiom1R77fnRnW2cAACdMxDM3OM854.jpg "height="/>

4-3 Modify the password of the root or other account using the root privileges of the current virtual machine:

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/54/33/wKiom1R77fnjSpNiAACvcR7zGXQ431.jpg "height=" 103 "/>

4-4 Copy the current passwd and shadow files back to a disk:

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/54/33/wKiom1R77fqx6V6pAACw-9Y_Bas488.jpg "height="/>

4-5 Restore the account password settings for virtual machine B:

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/54/33/wKiom1R77fqBVN5kAACf0Kent1E069.jpg "height="/>

Five. Umount a disk and detach the disk from virtual machine B:

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/54/33/wKiom1R77frwhX2uAACkEjMIq6g455.jpg "height=" 127 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/54/33/wKiom1R77fqQB_zEAADGjb_M-UE504.jpg "height=" 377 "/>

VI. Re-create the virtual machine with a disk:

Select Create from "My Disk" at the time of creation

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/54/33/wKiom1R77friEtqGAACNYkJrfS8775.jpg "height="/>

After the virtual machine is created, you can log in directly with root because the user name password authentication is enabled when using SSH connection.

This article is from the "Gao Wenrong" blog, make sure to keep this source http://gaowenlong.blog.51cto.com/451336/1584972

Modify the Linux system login password by mounting a disk on Windows Azure

Related Article

Cloud Intelligence Leading the Digital Future

Alibaba Cloud ACtivate Online Conference, Nov. 20th & 21st, 2019 (UTC+08)

Register Now >

11.11 Big Sale for Cloud

Get Unbeatable Offers with up to 90% Off,Oct.24-Nov.13 (UTC+8)

Get It Now >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.