admin管理员组

文章数量:1590507

 一  普通用户无法sudo,同时也没有其他用户可用

#test用户使用sudo报错,没有权限
test@test:~$ sudo vi /etc/sudoers
[sudo] password for test: 
test is not in the sudoers file.

二  关闭ubuntu 服务器,重新开机 按下ESC 键

1 出现GRUB引导菜单,选择"Advanced options for Ubuntu" ,按 回车 确定

2 选择 Ubuntu, with Linux 6.8.0-31-generic (recovery mode),按 回车 确认

3 系统将进入恢复 选择项,选择 Drop to root shell prompt,按回车 ,进入命令行

4 修改root密码

#输入如下
passwd root

 

5  普通用户加入sudo 权限

sudo vi /etc/sudoers

 6 重新启动服务器

reboot

本文标签: 也不普通用户解决方案密码Ubuntu