目 录CONTENT

文章目录

Debian12中使用sudo提示 xx不是sudoers文件

过客
2025-02-11 / 0 评论 / 0 点赞 / 23 阅读 / 0 字

Debian 12 安装完后,通过终端执行 sudo 命令,提示错误:

1、终端输入 su 回车,输入 root 密码,回车,切换到 root 用户

2、 修改 sudoers 文件

vi /etc/sudoers

# 找到 # Allow members of group sudo to execute any command
# 在 %sudo ALL=(ALL:ALL) ALL 下面添加 xxx ALL=(ALL:ALL) ALL,xxx 为前面无法执行 sudo 命令的用户名

最后按 wq!强制保存

0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin

评论区