I need to edit /etc/sudoers from a script to add/remove stuff from white lists.
/etc/sudoers
Assuming I have a command that would work on a normal file, how could I
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.
/etc/sudoers.d/
0440
It might help.