The author's machine is equipped with the Redhat Linux7.2 operating system, which has the KDE and GNOME desktop. Because only the superuser root is installed, the superuser's permissions are too large, only for system maintenance and installation software, Usually use should be logged in with ordinary users. So you need to create a new ordinary user. This is also simple, open "Menu → System → Account Manager", add a user to get it! You can come to log in again: After you with the root, enter your password, ah! Password error, can't enter the system. I know that the user password under RedHat7.2 is saved in / etc / shadow, and should find a breakthrough from here.
1. Put the system to install the disc, restart the machine, quickly press the DEL key when starting, enter the CMOS, change the start order to the CD first start, so start the Linux installer, press F5, press Tip to enter Linux Rescue Enter Enter the rescue mode, then select the language and keyboard, enter directly, the program prompts the Linux system on the hard disk to install the Linux system to / mnt / sysimage, and then the superuser prompt #.
2, enter the hard disk ETC directory: CD / MNT / SYSIMAGE / ETC, first do backup and prevent:
CP shadow shadow.old Modify the properties of the shadow file to write: chmod w shadow and modify it with VI: find that row with root user information: root: ....:, between the first two colons is encrypted Password, delete it (the colon cannot be deleted), the storage exit. This way the root's password is empty.
Users who do not use VI can take the following methods: find a DOS disk inserted into the floppy drive, copy Shadow to DOS disk: Mcopy Shadow A: / Then modify the notepad in the attachment in Windows, pay attention to open the file type To select all files (*. *), The deployment exits. Finally, copy:
McOPY A: / Shadow MNT / Sysimage / ETC
3. Remove the properties of shadow back to read-only: chmod -w shadow, finally entering exit exits, remove the disc.
4. For safety, the root window should be added to the terminal window after the restart.