PVE Black Qunhui Forgot Password and Change Password

After changing the password of Black Qunhui to a random number, I forgot to save it. As a result of my retarded operation, the PVE lost contact directly and the network storage mount of other devices failed indirectly.

This article was published on the Zimiao haunting blog, and the reprint should comply with the CC agreement of this site, that is, the signature and link of this site should be retained:
PVE Black Qunhui Forgot Password and Change Password- https://www.azimiao.com/9372.html

Front

Since the underlying layer of Qunhui is based on Linux, the password modification method in Linux can take effect.

The slight difference is that, Qunhui has a partition of about 2.4G on each hard disk, which contains the operating system of Qunhui and is organized in the form of RAID1

If only the password data in a single disk is modified, the password configuration will be reset to * after power on, and the account will be disabled.

Rescue process

Step 1: Transfer the hard disk

First, shut down the Qunhui VM, select the hard disk, select Reassign Owner in the PVE Disk Action, and transfer the data disk to another Windows VM (if not, create one, Windows 10 is OK).

Note that in this step, several data disks will be transferred.

Step 2: Attach the hard disk

In order to change the files on the hard disk, we need to use some third-party tools to attach/modify the contents of the hard disk.

Start up the Windows VM and remotely mount it. Then download and install the latest extFS trial version of Paragon Software in the virtual machine.

In principle, DiskGenius can be used to modify files directly without attaching the hard disk in this step, but there are some problems in actual use, which will be discussed later.

If you can't find the download address, you can download the installation package I provided. Note that with future Windows version updates, the lower version of extFS may not work properly.

 extwin_trial_en.msi Link: https://pan.baidu.com/s/18b_sMjslcLwNyn2e8vUSsw?pwd=miao Extract code: miao copies this content and opens Baidu online disk mobile app, which is more convenient to operate

After the installation is completed, open the software and attach the 2.4G partition on several hard disks (if there is no prompt for the 2.4G partition, don't worry about the hard disk).

After mounting, several drive letters will appear in the "This computer" of the virtual machine.

Step 3: Change the password

Find the etc folder in the attached partition, and you need to modify two files: shadow And shadow.cfgen.bkp

Open the shadow file with a text editor such as vscode, nodepad * *, and find the line of your user name, which is as follows:

 Yetu: A string of encrypted password strings: 19365:0:99999:7:::

take The encrypted string in the middle of the colon Replace with a known password string. For example, the password string with clear text of 888888 is:

 //The string comes from Youyi Technology $6$qZZGv6epxQb9lLi1$S7eX8wxX6t9cjTvda. VmEJtUl5EpV.gZ2zB9rUC29/sVvon.xu/D3GYzhlSkQ56l3lM1XoIScJK7dlwJmYN0L0

If the shadow cannot be saved after modification, you can first save it to the desktop, delete the shadow file in the mount directory, and then copy the shadow file into it.

Modify in the same way shadow.cfgen.bkp

For each system mounted disk, you need to replace the two files under ETC. You can either manually modify one by one, or copy the first modified file to another disk.

Step 4: Attach the hard disk back to the DSM virtual machine

First, unmount the Qunhui hard disk in the Windows VM, and then shut down the Windows VM.

According to the previous SATA sequence, use PVE's DiskAction to mount the hard disk back to the Qunhui VM.

This operation is the reverse of step 1, but it is not detailed.

Step 5: Start up

After the replacement is completed, you can start the machine. If you can, you can log in with the general password set above in clear text.

Step 6: Modify the new password

After logging in, be sure to modify the password once through Qunhui's web management, so that various configurations and files can be saved synchronously.

problem

  1. Why not use DiskGenius
    First of all, the function of DG to modify files on the disk is the professional version function, that is, charging.
    Secondly, it seems that some DG Open Center versions have file differences after modification, which causes the string to be reset to * after startup.

  2. All disks have been modified or not, and they are replaced with*
    First, check whether the file on all disks is consistent.
    Secondly, if the Qunhui storage pool is configured with SSD cache, you can separate the SSD cache disk from the PVE console after modifying the common hard disk files, and then power on the disk. If there is no problem, attach the cache disk.

Zimiao haunting blog (azimiao. com) All rights reserved. Please note the link when reprinting: https://www.azimiao.com/9372.html
Welcome to the Zimiao haunting blog exchange group: three hundred and thirteen million seven hundred and thirty-two thousand

Comment

*

*