How do I edit /etc/sudoers from a script?

后端 未结 12 816
花落未央
花落未央 2020-12-04 05:43

I need to edit /etc/sudoers from a script to add/remove stuff from white lists.

Assuming I have a command that would work on a normal file, how could I

12条回答
  •  心在旅途
    2020-12-04 06:34

    On Debian and it's derivates, you can insert custom script into/etc/sudoers.d/directory, with rights0440– for more info see /etc/sudoers.d/README.

    It might help.

提交回复
热议问题