gpt4 book ai didi

linux - 向另一个用户提供 sudo

转载 作者:太空宇宙 更新时间:2023-11-04 05:44:10 24 4
gpt4 key购买 nike

我想向测试用户授予 sudo 访问权限,以便在 Linux 中切换到 test2 sudo 命令。但测试用户不应该进入 root 帐户。

请帮忙,谢谢

最佳答案

在/etc/sudoers 中 - 添加测试 ALL=(ALL) NOPASSWD:/bin/sudo/bin/su - test2

这有效

关于linux - 向另一个用户提供 sudo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29555381/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com