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
Try to echo it. You have to run it in a subshell, though. Example:
sudo sh -c "echo \"group ALL=(user) NOPASSWD: ALL\" >> /etc/sudoers"