您的位置:首页 > 其它

Ubuntu忘记密码后,如何修改密码遇到的问题

2015-06-12 15:13 417 查看
这个问题出现在我使用别人建好的ubuntu虚拟机的时候,因为不知道他的账户密码。如果您也遇到的相似的问题
,网上搜索了一番,按照以下步骤重新为用户设定了新密码。重启Ubuntu,随即长按shift进入grub菜单;选择recovery mode,回车确认;在Recovery Menu中,选择“Root Drop to root shell prompt”,回车确认;进入shell界面,使用passwd命令重新设定密码:passwd david,(david是系统中已有的username),回车确认;输入新密码;再次确认新密码;看到密码设定成功提示:passwd: password updated successfully;重启系统进入GUI界面:sudo reboot;
当然如果不发生意外,问题到这里已经解决了。但此时,我修改密码过程中显示失败:Authentication token manipulation error
root@u13-04:~# passwd nyuser  
Enter new UNIX password:  
Retype new UNIX password:  
passwd: Authentication token manipulation error  
passwd: password unchanged
网上说原因如下:This is the result of trying to work on a file system while mounted as read-only. The solution is a simple one. Before making changes to the users password mount the filesystemas read-write which allows for the necessary changes to be made.
mount -o rw,remount /
Now try to change the users passwords again.
root@u13-04:~# passwd nyuser  
Enter new UNIX password:  
Retype new UNIX password:  
passwd: password updated successfully
希望能够帮到您~

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ubuntu 忘记密码