root下visudo 例如添加
useyyyy ALL=(ALL:ALL) ALL
usexxxxx ALL=(ALL) NOPASSWD:ALL
如果出现a world file 修改权限,例如
chmod 0440 /etc/sudoers.d/ai_sudoer
chown root:root /etc/sudoers.d/ai_sudoer
root下visudo 例如添加
useyyyy ALL=(ALL:ALL) ALL
usexxxxx ALL=(ALL) NOPASSWD:ALL
如果出现a world file 修改权限,例如
chmod 0440 /etc/sudoers.d/ai_sudoer
chown root:root /etc/sudoers.d/ai_sudoer
评论