After Linux is installed, there will be a root user. So how can I change the root user password without knowing the password?
In this system, the RedHat Linux installation environment is VMware 6.0 guided by grub.
The method is as follows:
1. Press "E" on the grub boot interface to enter the grub editing mode.
2. Select the second option in edit mode, that is, "kernel/vmlinuz-2.4.20-8 Ro root = label = /". Then press "E" to edit this item.
3. Add "single" to the end (Note: There is a space in front ). Press enter and then press "B" to start the linux single-user mode.
4. Because it is in single-user mode, no password is required. After the boot is complete, at the prompt (note that the prompt is like sh-2.05b #, not the previous prompt) input: "passwd root" (passwd is the command to change the user password .). Then, modify the password as prompted. (Sometimes the system prompts bad password. It doesn't matter. The reason is that the password is too simple or a common word .)
5. Restart and enter normally. OK. The root password has been modified.