First of all, some method only implgement on centos + Docker without formal tests.
of course you have had install the application with the command : yum -y install sudo then you will be recieve the message
How to do ?
su root
then chmod u+w /etc/sudoers and nano /etc/sudoers
find the words like: people run within the wheel ...
%wheel ALL=(ALL) ALL
add another sentence
xxx ALL=(ALL) ALL
2. find the key words like NOPASSWD :ALL
add new sentence
XXX ALL = NOPASSWD: ALL
save all changes and quit
and do not forget the chmod u-w /etc/sudoers
finished!!
+++++++another warn
Failed to start .service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
sudo systemctl ~~~~~~~~
本文档详细介绍了如何在CentOS系统中为特定用户配置免密码sudo权限,以便更好地管理Docker容器。步骤包括修改sudoers文件、添加用户到wheel组以及设置NOPASSWD选项。
1万+

被折叠的 条评论
为什么被折叠?



