This is my /etc/sudoers
file edited with visudo, but I'm still asked to enter my password when doing sudo.
root ALL=(ALL) ALL
%admin ALL=(ALL) NOPASSWD:ALL
petruza ALL=(ALL) ALL
petruza ALL=(ALL) NOPASSWD:ALL
## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL) ALL
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL
I had this running in previous OS installs but now it doesn't work.
My main need for this is to automatically execute xampp
at startup and not having it asking me for the password.
Best Answer
None of your modifications of the sudoers file is needed if you start xampp with a launch daemon:
Create a file org.xampp.startup.plist in /Library/LaunchDaemons with
sudo touch/nano ...
and the following content:If you installed XAMPP somewhere else please modify
<string>/Applications/XAMPP/xamppfiles/xampp</string>
accordingly.chown/chmod the file:
Load the daemon with:
If everything runs well, you may remove the following part of the plist:
Restore the default sudoers file with visudo: