OS: Arch linux - Manjaro
I'm trying to enable the following commands to not require a password input for my main user account: ab
sudo systemctl stop NetworkManager sudo systemctl start NetworkManager
I've read and have tried to follow some of the online help and got so far as this by using
sudo -i to create the file
/etc/sudoers.d/ab with the following code:
ab ALL=(root) NOPASSWD: sudo systemctl stop NetworkManager ALL=(root) NOPASSWD: sudo systemctl start NetworkManager
I've tried to make the following edits without success:
Each time I make the edit and save, I
cat /etc/sudoers.d/ab to check that changes were made, and I always open up a new terminal to try out the command, each time trying a combination of the following while still being asked for a password input:
sudo systemctl start NetworkManager sudo /bin/systemctl start NetworkManager systemctl start NetworkManager /bin/systemctl start NetworkManager
Is starting a new terminal enough, or do I need to restart my whole system to initiate the changes?
Or maybe I'm forgetting another step?