-----------------------experiment one: Break the root password----------------------------
1. Init 1
2, enter the diagram interface, and then enter the diagram two interface, enter single, S, S, 1, enter the one-user mode.
3, did not enter the command to enter the system, you can change the passwd, the crack success. Init 5, restart.
To prevent the method from being cracked:
First, vim/boot/grub/grub.conf
Add password under Hidden menu: passwd magedu (Clear, Low security)
Default selection Startup item title, added separately after kernel and INITRDH (hd0,0)
650) this.width=650; "src=" http://note.youdao.com/yws/res/8464/434F294F961A4E989A2A887A2764AC27 "/>
After that, it's not that easy to hack a password into a single user.
After restarting, go to the menu page, press p, enter the correct password to enter.
Second, the plaintext password is not safe, set into ciphertext.
Grub-md5-crypt Special encryption file, input magedu, get ciphertext
650) this.width=650; "src=" http://note.youdao.com/yws/res/8491/D4E35DA2507445AFA63FA09A5DF1F4D2 "/>
Copy Ciphertext to vim/boot/grub/grub.conf
650) this.width=650; "src=" http://note.youdao.com/yws/res/8492/9AAC4C8BB9D349DF8DD73F5EE134DB59 "/>
After restarting, go to the menu page, press p, enter the correct password to enter.
650) this.width=650; "src=" http://note.youdao.com/yws/res/8496/AB1F2F1766644A79BFC76C32A88707F1 "/>
(Figure-Start)
Third, if the ciphertext password is placed in the following location, it becomes the operating system startup password. Reboot to enter
(Figure-Start) interface, press Enter and a password is required to start.
650) this.width=650; "src=" http://note.youdao.com/yws/res/8506/456D319C1D7B402CB862D47990987CD2 "/>
-------------------------Experiment Two: Modify user mode-------------------------
650) this.width=650; "src=" Http://note.youdao.com/yws/res/8157/39001EB6889A4EE99D772DE6FDBDDB5B "/>
1, vim/etc/inittab view Current user mode--id:5:initdefault:
2, Id:5:initdefault: modified to id:3:initdefault:--boot automatically enter 3 mode
If you change to 6, the boot cycle will occur;
The experiment is as follows: Change to 6 mode after reboot, after restart, press Ctrl+alt to enter diagram one interface and select
Centos 6 .... This item, then press A to enter the diagram two interface;
650) this.width=650; "src=" Http://note.youdao.com/yws/res/8139/51FE1604CAC7479EB7FBD3BDB65F94A6 "/>
(Figure I)
650) this.width=650; "src=" http://note.youdao.com/yws/res/8163/D9A6D0607A294F09967E05C94EDFBCD0 "/>
(Figure II)
3, enter the number 5, temporarily into the 5 mode, skip the previously modified 6 mode.
4, restart after the user login, Vim/etc/inittab, change back to the original mode.
This article is from the Linux file system blog, so be sure to keep this source http://13250262.blog.51cto.com/13240262/1968193
Hack root password and modify user mode under Linux