Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running XAMPP which comes with a little "XAMPP Control" app that lets me start and stop Apache and MySQL by clicking a button. When I do that, I'm prompted by Lion for my admin password. Is there a way to skip this step? (On Windows, this is sort of like me asking "how can I run the XAMPP Control program in administrator mode?" --not sure if there's an analog for Mac.)

share|improve this question
up vote 3 down vote accepted


Mac OSX asks you for your password because XAMPP is trying to run the *nix command [sudo]( This can be overcome by one of two ways:

a. Allow ALL sudo commands to be run without a password.

b. Allow ONLY the XAMPP command to be run with no password.


To use one of these solutions, do the following:

  1. Open (I like to hit Command+Space, then type "", then hit Enter).
  2. Run sudo nano /etc/sudoers.
  3. Append the following text to the file, where username is your short username (type whoami into the terminal to get it):

    • For option a:

    %username ALL=(ALL) NOPASSWD

    • For option b:

    %username ALL= NOPASSWD: /Applications/XAMPP/xamppfiles/xampp

  4. Press Ctrl+x, and save when prompted.

Note that on OSX Mavricks, you may have to add a % sign before the username (in /etc/sudoers).

share|improve this answer
FYI I added this: "username ALL= NOPASSWD: /Applications/XAMPP/XAMPP\" – Eric Aug 10 '12 at 20:57
For etc/sudoer noobs, like me, be careful not to edit sudoers file using your favorite text editor (just made this mistake … spent last hour trying to fix). The sudoer file has this commented message at the top: This file MUST be edited with the 'visudo' command as root (i.e., $ sudo visudo). Failure to use 'visudo' may result in syntax or file permission errors that prevent sudo from running. – mhulse Aug 4 '14 at 1:55
Use the visudo command. It will check the file syntax before 'commiting' it. – borisdiakur Dec 21 '15 at 21:16

The thread Starting Xampp Control Panel without password lists two possible solutions :

  1. Write scripts that start and stop XAMPP, specifying the password in the scripts.
    The two scripts are included in the thread.
  2. Edit the /etc/sudoers file, configuring that sudo /Applications/XAMPP/xamppfiles/xampp start doesn't need a password.
share|improve this answer
Using the Script and Exporting it as a .App was the best solution. Thanks. – Moe Dec 26 '14 at 6:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .