When the system selection interface appears, press "E" on the Red Hat Linux option,
Three options will then appear, and on the "kernel/boot/vmlinuz-2.4.18-14 Ro root = label =/" press the "e" key to edit,
Add "single" before "Ro" or "root", and press enter to return.
Press the "B" key to start, enter the character interface, when "sh-2.05b #" appears, it means that has entered the single user mode.
Now, enter "passwd root" to reset the root password.
After the configuration is complete, restart reboot and use the password you just set to enter the Linux system.
I. Lilo
1. When lilo appears: Enter linux single
Lilo: linux single
2. Press enter to directly access the Linux Command Line
3. # vi/etc/shadow
Delete the contents of the first line, that is, the content before "root" and "Next", in the line starting with "root,
The first line is similar
Root ::......
Save
4. # restart reboot. the root password is blank.
Ii. Grub
1. When the grub screen appears, use the up and down keys to select the one you usually start Linux (do not select DoS), and then press the e key
2. Use the up and down keys again to select the one you usually start Linux (similar to kernel/boot/vmlinuz-2.4.18-14 Ro root = label =/), and then press the e key
3. Modify the command line you see and add single. The result is as follows:
Kernel/boot/vmlinuz-2.4.18-14 single Ro root = label =/
4. Press enter to return, and then press the B key to start, you can directly enter the Linux Command Line
5. # vi/etc/shadow
Delete the contents of the first line, that is, the content before "root" and "Next", in the line starting with "root,
The first line is similar
Root ::......
Save
6. # restart reboot. the root password is blank.
====================================== For Redhat Linux:
Place the cursor on the Linux system with the up/down key, and press "e"
Press "E" on the line with the kernel, enter "Space single", and press ENTER
Press "B" to start. The system automatically enters the single-user mode,
Run the passwd root command and enter the new password as prompted.
After changing the password, enter the reboot command to restart the system.
3. 1. restart the system. When the system starts to the grub or lilo (usually grub) boot menu, find the current Boot item of the system (you can press the arrow key to expand the hidden menu ); 2. Position the cursor on the option and press the "e" key to enter the editing status of the Guide;
3. This option has three lines of statements. Use the cursor to select the second line, that is, the line starting with "kernel;
4. Press "E" on this line to enter the editing status of this line;
5. Add a space at the end of the row and write the number 1, similar to this:
Kernel/boot/vmlinuz-2.6.9-11.19 Ro root = label =/1
6. After modification, press "enter" to return to the original interface;
7. Press the "B" key to start the guide.
Iv. 1 ). grub 1. when the grub screen appears, use the up/down key to select the item that you usually start Linux (do not select DoS), and then press the e key 2. again, use the up and down key to select the one that you usually start Linux (similar to kernel/boot/vmlinuz-2.4.18-14 Ro root = label =/), and then press the e key 3. modify the command line you see now, add single, the result is as follows: kernel/boot/vmlinuz-2.4.18-14 single Ro root = label =/4. press enter to return, and then press the B key to start, you can directly enter the Linux Command Line 5. # vi/etc/shadow deletes the first line, that is, the content before "root" and "Next", in the line starting with "root". The first line is similar to "root: :...... save 6. # reboot restart. the root password is blank.
2 ). when the system enters the single-user status, use passwd root to change the status. 5. Use a CD to boot the system and perform the Linux rescue status. Mount the original/partition file as follows: CD/mnt mkdir HD Mount-T Auto/dev/hdax (original/partition ID) hd cd hd chroot. /passwd root.
However, this method also illustrates the security vulnerability in linux single-user mode. It is dangerous if someone intentionally modifies the root password. Therefore, we also need to disable single-user login.
In single-user mode, it can solve the problem of forgetting the root password of a Linux super user, which may also be used by friends with ulterior motives to crack and modify the password of the root user, which is not safe. Well, we have to disable single-user login. See the following method:
If you use grub for security, you only need to modify the password of/boot/GRUB/grub. conf or/etc/grub. conf (/etc/grub. conf is/boot/GRUB/grub. conf ).
For example: VI/boot/GRUB/grub. conf to edit the configuration file. you can add Password = password to the next line of the splashimage parameter. After saving the password, restart the computer and log on to the GRUB menu page again, in this case, you cannot directly use the e command to edit the start tag. You must use the p command and enter the correct password before editing the start tag, however, it is not safe to set a plaintext password.
(1) Linux system password cracking
1. press e in the grub option menu to enter the editing mode. 2. edit the line/init 1 (or/single) of the kernel 3. press B to restart 4. run the following command: root @ # passwd root (set the root password) enter new Unix Password: Enter the new password root @ # init 6
(2) Debian Linux system password cracking
1. in the grub option menu 'debian GNU/Linux ,... (recovery mode) ', press e to enter the editing mode 2. edit the RO single at the end of the kernel line and change it to RW single init =/bin/bash. Press B to restart. 3. run the following command: root @ (none) # Mount-a root @ (none) # passwd root @ (none) # reboot
(3) FreeBSD system password cracking
1. boot into the boot menu 2. select each item (Press 4) to enter the single-user mode. 3. enter the command root @ # Mount-a root @ # fsck-y root @ # passwd (password change command) root @ # root (username to crack the password) enter new Unix Password: root @ # init 6 (restart)
(4) Solaris system password cracking
1. Select the Solaris failasfe option in the grub option dish. 2. The system prompts do you wish to have it mounted read-write on/? [Y, N,?] Select y 3. enter the single-user mode. 4. enter the following command # passwd # New passwd: Enter the new password # re-enter new passwd: Enter the new password # init 6 (restart)
(5) NetBSD system password cracking
1. boot: When a prompt symbol is displayed and the last five seconds are counted, type the following command:> boot-s (enter single-user mode command) 2. enter pathname of shell or return for SH in the following hint: Press enter. 3. Enter the following command: # Mount-A # fsck-Y 4. Use passwd to change the root password. 5. Use the exit command to enter the multiplayer mode.
Linux operating system password cracking (1) Linux system password cracking 1. press e in the grub option menu to enter the editing mode. 2. edit the line/init 1 (or/single) of the kernel 3. press B to restart 4. run the following command: root @ # passwd root (set the root password) enter new Unix Password: Enter the new password root @ # init 6 (2) Debian Linux system password cracking 1. in the grub option menu 'debian GNU/Linux ,... (recovery mode) ', press e to enter the editing mode 2. edit the RO single at the end of the kernel line and change it to RW single init =/bin/bash. Press B to restart. 3. run the following command: root @ (none) # Mount-aroot @ (none) # passwd rootroot @ (none) # reboot (3) FreeBSD system password cracking 1. open Enter the boot menu 2. select each item (Press 4) to enter the single-user mode. 3. enter the command root @ # Mount-aroot @ # fsck-yroot @ # passwd (password change command) root @ # root (username to crack the password) enter new Unix Password: root @ # init 6 (restart) (4) Solaris system password cracking 1. select Solaris failasfe item 2 in the grub option dish. the system prompts do you wish to have it mounted read-write on/? [Y, N,?] Select y3. enter the following command # passwd # New passwd: enter a new password # re-enter new passwd: enter a new password # init 6 (restart) (5) netBSD system password cracking 1. boot: When a prompt symbol is displayed and the last five seconds are counted, type the following command:> boot-s (enter single-user mode command) 2. enter pathname of shell or return for SH in the following hint: Press enter. 3. type the following command: # Mount-A # fsck-y4. use passwd to change the root password. 5. Use the exit command to enter the multiplayer mode.
In the last step, enter "Exit" and press Enter. The computer restarts automatically. Here, the password of the root user is cracked.
If you have obtained the plaintext password, you can modify the grub startup tag to change the root password.
Therefore, MD5 encryption is required. Enter the grub-md5-crypt in the terminal and press enter, then the system will ask to enter the same password twice, then the system will output the MD5 code. You only need to copy the generated MD5 ciphertext, and then set the global or menu password according to the password-MD5 MD5 ciphertext format, save and quit, and restart the computer.
In this way, the linux single-user mode can be started, which is a bit similar to the Windows security mode, that is, only the most basic system is started, and network services and system services are not started. After the single-user mode guide is complete, a # prompt will be displayed, indicating that you already have Super User Permissions. Then, run the following command after:
/Usr/bin/passwd
The system should prompt you to enter the password. This password is not displayed and must be entered correctly. After you press enter, the system will ask you to enter it again. The input requirements are consistent, then you will see the prompt that the password is successfully modified. Enter the command init 3 and enter the system character interface mode (the system will change the running level again). the login prompt is displayed, try again to see if you can log on with the root account and the modified password.