This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
Replies: 1 comment 1 reply
-
切换到 root,然后改一下 sudo 相关文件的权限 awk 'function chmod(m, o){ system("chmod -v " m " " o) }
BEGIN {
split("/etc/sudo.conf, /etc/sudoers, /usr/bin/sudo", arr, ", ")
for (i in arr)
system("chown -v 0:0 " arr[i])
chmod(644, arr[1])
chmod(440, arr[2])
chmod(4755, arr[3])
}' 如果不行的话,再用 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
由于 vnc 突然出现莫名的长时间黑屏,且重装容器后依然无法解决,干脆备份重置 termux,只备份了 $HOME 文件夹,还原重新配置 termux 后使用 t p a a 进入容器,使用 sudo 命令时出现如下报错
sudo: /etc/sudo.conf is owned by uid 1001, should be 0 sudo: 已设置“no new privileges”标志,它阻止 sudo 以 root 身份运行。 sudo: 如果 sudo 正在容器中运行,您可能需要调整容器配置以禁用该标志。
直接以 root 身份登陆时,需要 root 权限的部分命令依然能正常执行,而切换 sudo 用户则无法使用 sudo (备份前可以正常使用 sudo 命令)
Beta Was this translation helpful? Give feedback.
All reactions