I'm using a python script to run docker, but docker requires sudo commands to run and it's bad practice to store the sudo password in the file or give the whole python script sudo rights, I've seen a method where you enable the system to run certain commands without entering a password, I've tried it but I can't get my head around it, I mainly entered it wrongly (I think) I even corrupted my sudoers file once and fixed it.
So can anyone explain this line for me and why it's not working?
username ALL = (root) NOPASSWD: /usr/bin/docker
=
i.e. useusername ALL=(root) NOPASSWD: /usr/bin/docker
– heemayl Jun 23 '15 at 12:16