Project 2 - Task 4 - cracking and protection of the root account password

Task 4: Cracking and Protection of the Password of the Root Account

Subtask 1 - Enter single-user mode and change the root password.

Step 1: When the machine is counting down, press the a key twice to enter the following kernel editing interface.


Step 2: Enter "[Space]+1" in the last line and press Enter to enter the single-user interface.


Step 3: As shown in the figure, enter "passwd", press Enter, you can change the root password, enter the first time and press Enter, enter it once to confirm whether the two passwords are consistent, and then press Enter, if it displays "successfully" ”, indicating that the password change was successful.


Step 4: Enter "init 5" to enter multi-user mode text mode.

Method 2: Step 1: Press the e key twice in a row to enter the following system startup waiting interface when the computer is turned on.


Step 2: Press the e key again to enter the following interface, press the up and down keys on the keyboard to move to the line starting with kernel as shown in the figure below, and press the e key again


After entering the interface as shown in the figure below, enter "[Space]+1" after quiet, and press the b key to enter the single-user interface.


Still enter the new password, press Enter, confirm the password, and press Enter; this is the prompt to see the success, namely: successfully.


Subtask 2: Encrypt the single-user mode.

Method 1: Plaintext method

Enter the "vim /boot/grub/grub.conf" command and press Enter to open the grub.conf file. Be sure to place the cursor under the splashimage line, enter "password=555222", and then press the Esc key to exit the editing mode. Finally enter ":wq", save and exit.


After encryption, when you enter the single-user mode again, you need to press the p key, and enter the password after the pop-up passwd: to enter, and the encryption process ends.


Method 2: MD5 encryption method

Step 1: Enter [grub-md5-crypt] and press enter


Enter the same password twice, then the system will output the MD5 code



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325817509&siteId=291194637