今天安装了Debian 10.1发现无法使用sudo,经过查询,是因为sudoers文件里没有此用户名。

使用非root用户时出现以下错误提示。

abcdef is not in the sudoers file.  This incident will be reported.

解决方法:

nano /etc/sudoers

增加以下一行

abcdef ALL=(ALL) ALL

其中abcdef是用户名

保存退出即可

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注