The author's machine is equipped with the Redhatlinux7.2 operating system, installing the KDE and GNOME desktop, because only the superuser root is installed, but the permissions of the superuser are too powerful, only applicable to 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, enter CMOS, change the start order to the CD first start, so that the Linux installer is started, press F5, press the prompt to enter LinuxRescue Enter, Enter the rescue mode, then you will choose the language and keyboard, you can use it directly, the program prompts the Linux system on the hard disk to install the Linux system under the / mnt / sysimage, and then the superuser prompt #.
2, enter the hard disk ETC directory: CD / MNT / SYSIMAGE / ETC, first do backup and prevent:
CPSHADOWSHADOW.OLD Modify the properties of the shadow file to write: chmod wshadow and modify it with VI: Find the row with root user information: root: ....: The first two colons are encrypted passwords. It deletes (the colon can not be deleted), the storage disk exits. 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 the DOS disk: McOpyshadowa: / Then modify the notepad in the attachment in Windows, pay attention to open the file type must be selected All files (*. *), The storage disk exits. Finally, copy:
McOpya: / shadowmnt / sysimage / etc
3. Remove the properties of Shadow back to read-only: chmod-wshadow, finally entering exit exits, remove the disc.
4. For safety, the root window should be added to the terminal window after the restart.