ubuntu忘记密码

Do these two things just to make sure:

mount -o remount,rw /

This first part remounts the root partition as read/write since it was only in read mode. It actually dismounts the root partition and then mounts it again as read/write.

Then do this:

chmod 640 /etc/shadow

Then do the sudo passwd USER. It should work after that. This part gives the correct permissions to the shadow file.

 

posted @ 2017-01-09 20:49  空山皓月  阅读(166)  评论(0编辑  收藏  举报