Galaxy Kirin V10 operating system root password reset

1. Description of requirements

  I copied a virtual machine with the kingbase database environment installed from the kingbase engineer. There is only one kingbase common account, root password location, and this account has not been added to the sudo group, so new software cannot be installed and deployed. To satisfy our needs, we need to reset the root password.

Second, the server version root password reset steps

1. After restarting, press e

  Restart the operating system, press the ESC key, enter this interface and press the e key to enter the grub mode.
insert image description here

2. Enter the grub account password

  The bank Kirin V10 server version operating system needs to enter the grub account password to enter the grub mode. The default account password is: root/Kylin123123.
insert image description here

3. Modify the startup parameters

  After entering the account password, enter the edit mode, find the line beginning with linux, and add rw init=/bin/bash at the end of the line.
insert image description here

4. Enter single-user mode

  After modifying the startup parameters, enter Ctl+x to start the system according to the prompt at the bottom to enter the single-user mode.

5. Modify the root password

  After entering the single-user mode, use the passwd command to modify the root account password. At this time, you do not need to enter the original password, and you can directly enter the new root password you need to set twice.
insert image description here

6. Restart the system

  After changing the password, we restart the operating system. At this time, the reboot command cannot be used directly. We need to specify the completion path /usr/sbin/reboot. It is recommended to add the -f parameter for the virtual machine environment.
insert image description here

7. Verify the root password

  After logging in with the kingbase account, use su to switch to the root account, and the switch is successful after entering the password.
insert image description here

3. Reset the system account password of the desktop version

  The account password reset in repair mode is mainly used to restore the common account password without configuring the root password, and it can also be used to set the root password for the first time. However, it is required to enter the root password to enter the repair mode when the root password is set for the first time. If the root password is forgotten, we need to reset the root password through the second chapter.

1. Select Kylin V10 advanced options when starting

  After the boot system starts, select in the startup options - Kylin V10 advanced options.
insert image description here

2. Select "recovery mode"

  Enter the following interface and select - Kylin v10.1, (recovery mode).
insert image description here

3. Enter repair mode

  As shown in the figure below, press Enter as prompted to enter the repair mode. If the selected installation language enters the repair mode and the Chinese display is garbled, we can directly press Enter. Since Galaxy Kirin is a mainstream brand of domestic operating systems, these areas still need to be improved.
insert image description here

4. Modify account password

  Enter the repair mode after startup, and use the passwd command to set the root account password. Of course, we can also use the passwd command to modify the passwords of other accounts. If you have set the root password, you will be asked to enter the root password when you enter the repair mode. If we forget the root password, then we can only modify the root password through the second chapter.
insert image description here
insert image description here

5. Restart the system

  After changing the password, use the reboot command to restart the system. As the version prompts, the Galaxy Kylin desktop version V10 is based on the debian system, which is different from the server version.

wuhs@wuhs-pc:~$ cat /etc/os-release
NAME=“Kylin”
VERSION=“V10.1 (juniper)”
ID=kylin
ID_LIKE=debian
PRETTY_NAME=“Kylin V10.1”
VERSION_ID=“v10.1”
HOME_URL=“http://www.kylinos.cn/”
SUPPORT_URL=“http://www.kylinos.cn/service.aspx”
BUG_REPORT_URL=“http://www.kylinos.cn/”
PRIVACY_POLICY_URL=“http://www.kylinos.cn”
VERSION_CODENAME=juniper
UBUNTU_CODENAME=juniper

Guess you like

Origin blog.csdn.net/carefree2005/article/details/129416499