在Ubuntu下设置sudo密码
(一)进入“恢复模式”
开机进入系统 ,选择菜单中"Advanced options for Ubuntu" ,-->选择 "Recovery mode" (恢复模式)
(二)恢复密码
# mount -n -o remount,rw / 【以读/写的模式挂载根(/)文件系统】
# passwd 用户名(默认sudo)
# New password:
# Retype new password:
# passwd: password updated successfully
(三)恢复正常模式
#reboot
(四)如果我把用户名称和密码都忘了怎么办
在恢复模式下,你可以很容易地列出你的 Linux 系统中的用户名称,使用目录
# cat etc/passwd
THE END
0
打赏
海报
![](https://www.music4x.com/wp-content/uploads/2023/06/1687785473-weixinzhifu.jpg)
![](https://www.sharexbar.com/wp-content/uploads/2019/07/zhifubao-150x150-1.jpg)
在Ubuntu下设置sudo密码
(一)进入“恢复模式”
开机进入系统 ,选择菜单中"Advanced options for Ubuntu" ,-->选择 "Recovery mode" (恢复模式)
(二)恢复密码
# mount -n -o remount,rw / 【以读/写的模式挂载根(/)文……
![](https://www.music4x.com/wp-content/uploads/2020/06/cropped-laoluo-e1647525593244.png)
共有 0 条评论