1
1
I'm trying to edit /etc/sudoers so that I can execute a bash script with a root password.
so far every edit I've tried to sudoers is not working.
I've tried adding each of these lines:
%admin ALL= NOPASSWD: /sbin/ifconfig
%admin ALL=(ALL) NOPASSWD: /sbin/ifconfig
%users ALL=(ALL) NOPASSWD: /sbin/ifconfig
"myusername" ALL=(ALL) NOPASSWD: /sbin/ifconfig
Each time I am able to save and quit out of visudo without any warning about syntax errors. But then when I try to execute the ifconfig command from my admin account, it still says 'permission denied'
ifconfig en0 down
ifconfig: down: permission denied
Can someone please tell me what is going wrong? thanx