Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 3 down vote accepted

Problem

Mac OSX asks you for your password because XAMPP is trying to run the *nix command [sudo](http://en.wikipedia.org/wiki/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.

Solution

To use one of these solutions, do the following:

  1. Open Terminal.app (I like to hit Command+Space, then type "Terminal.app", 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\ Control.app" –  Eric Aug 10 '12 at 20:57
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.