一、问题的原因
问题:输入命令 su root ,输入密码怎么输入都不正确
原因:因为刚安装好的Linux系统是没有给root设置密码的![图片[1] - linux无法进入超管模式root用户密码错误解决方法 - 我的学记|刘航宇的博客 图片[1] - linux无法进入超管模式root用户密码错误解决方法 - 我的学记|刘航宇的博客](https://cdn.jsdelivr.net/gh/liuhangyuie/image@master/images/20210310195402.png)
二、解决方法
输入以下命令
sudo passwd root
[sudo] password for sam(用户名): 输入当前登陆liunx用户名的密码
Enter new UNIX password: 输入新的密码并确认,此时的密码就是root新密码
Retype new UNIX password: 再次确认root新密码
弹出:passwd: password updated successfully(已成功更新密码)![图片[2] - linux无法进入超管模式root用户密码错误解决方法 - 我的学记|刘航宇的博客 图片[2] - linux无法进入超管模式root用户密码错误解决方法 - 我的学记|刘航宇的博客](https://cdn.jsdelivr.net/gh/liuhangyuie/image@master/images/20210310195441.png)
进入root权限
su root
切换到普通用户,如自己配置的用户名为sam
su sam