First, debian7.8
1. On the Grub Boot loader menu, select the entry you want to enter, type "E" to enter edit mode 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/6F/2D/ Wkiol1wt84cjiyv3aaez10krv98882.jpg "title=" 111.png "alt=" Wkiol1wt84cjiyv3aaez10krv98882.jpg "/>
2. Add Init=/bin/bash after quiet
Press CTRL-C or F10 to start the machine 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/6F/30/ Wkiom1wt8ikqtawaaahf0g8o-bu554.jpg "title=" Ccc.png "alt=" Wkiom1wt8ikqtawaaahf0g8o-bu554.jpg "/>
3, enter mount after seeing the root partition is RO (read-only state) 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M01/6F/2D/ Wkiol1wt9cag5zkhaaeer7z8oju257.jpg "title=" Ddd.png "alt=" Wkiol1wt9cag5zkhaaeer7z8oju257.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/2D/wKioL1WT9Eiz7IWtAAGsU1Eoo1E914.jpg "title=" Eee.png "alt=" Wkiol1wt9eiz7iwtaagsu1eoo1e914.jpg "/>
4, directly modify the root password will be error
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/30/wKiom1WT8qDDspUgAAB4Zkb0cUA672.jpg "title=" Fff.png "alt=" Wkiom1wt8qddspugaab4zkb0cua672.jpg "/>
5. Mount the root partition in read/write mode and change the password again.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/2D/wKioL1WT9I-AgLRHAACUTw8kxj0891.jpg "title=" Ggg.png "alt=" Wkiol1wt9i-aglrhaacutw8kxj0891.jpg "/>
6. Parameter description
Init=/bin/bash
Using ROOT to get the/bin/bash program
Second, centos6.6
1. On the Grub Boot loader menu, select the entry you want to enter, and type "E" to enter edit mode
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/2D/wKioL1WT9L-zmSf0AAEzeQ9DZDM409.jpg "title=" Hhh.png "alt=" Wkiol1wt9l-zmsf0aaezeq9dzdm409.jpg "/>
2, press ENTER after adding a single after quiet press ENTER, press B to restart the machine 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/6F/30/ Wkiom1wt8wbydtynaagrpnyihsa351.jpg "title=" Iii.png "alt=" Wkiom1wt8wbydtynaagrpnyihsa351.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/30/wKiom1WT8y_i4y15AADPbuRVd7U850.jpg "title=" Jjj.png "alt=" Wkiom1wt8y_i4y15aadpburvd7u850.jpg "/>
3, directly modify the root password
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/2D/wKioL1WT9QjhEhxKAAK15zEURck078.jpg "title=" Kkk.png "alt=" Wkiol1wt9qjhehxkaak15zeurck078.jpg "/>
Ps:debian Additional kernel parameters Init=/bin/bash also apply to CentOS
This article is from the "7928217" blog, please be sure to keep this source http://7938217.blog.51cto.com/7928217/1669891
Reset root password (Debian CentOS)