在Pve安装了Ubuntu20.04的Lxc容器,进入后使用sudo时报错了。
sudo: /etc/sudo.conf is owned by uid 100000, should be 0
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
查看了一下 /etc/sudo.conf
文件的权限发现是100000。
root@zngw:~# ll /etc/sudo.conf
-rw-r--r-- 1 100000 100000 4343 Apr 8 2024 /etc/sudo.conf
这个修改一下sudo.conf文件权限就可以了。如果是root
用户登录,直接修改
chmod root:root /etc/sudo.conf
如果不是root用户登录,先用su
切换到root用户来操作
su - # 然后输入 root 密码
chown root:root /etc/sudo.conf
评论区