How to reset password for unknow root

1. Click "e" when entering the grub

2. Add option " init=/bin/sh" to linux line. (/bin/sh can not be replace by /bin/bash , /bin/bash do not have passwd command)

3.Mount path (mount -o remount, rw /)

4.Change permission of passwd (chmod -v 4711 /usr/bin/passwd)

5.passwd root to change password

6.reboot target

 

posted on 2015-07-02 14:58  Newbie wang  阅读(180)  评论(0编辑  收藏  举报