Starting Xampp Control Panel without password

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Starting Xampp Control Panel without password

Postby phpmaven » 18. May 2010 22:25

Is there any way to setup the Xampp Control Panel so that it doesn't ask for a password every time it runs?

Thanks,

Mark
phpmaven
 
Posts: 2
Joined: 18. May 2010 22:18

Re: Starting Xampp Control Panel without password

Postby MegaChriz » 19. May 2010 09:26

I do not know a way to bypass the ask for a password for the Xampp Control Panel, but I know another way to start and stop XAMPP without the need to give your password all the time. That's when you make use of AppleScript.
Write a script that starts XAMPP and a script that stops XAMPP. In that script you specify your password. With XAMPP 0.5 for Mac there was an AppleScript delivered instead of a control panel.

This script is similar to the script that was delivered with XAMPP 0.5 (I modified it to my needs):
Code: Select all
-- Start XAMPP
set passwort to "" -- Rootpasswort eingeben, oder leer lassen
set befehl to "/Applications/XAMPP/xamppfiles/xampp start"

try
   if passwort is "" then
      set ausgabe to do shell script befehl with administrator privileges
   else
      set ausgabe to do shell script befehl password passwort with administrator privileges
   end if
on error fehler
   display dialog fehler
end try
This script starts a shell script (a command you could also enter in the Terminal).
You need to set the password of the administrator user from your Mac in the second line of above (set passwort to).

In the same way you can write an AppleScript that stops XAMPP:
Code: Select all
-- Stop XAMPP
set passwort to "" -- Rootpasswort eingeben, oder leer lassen
set befehl to "/Applications/XAMPP/xamppfiles/xampp stop"

try
   if passwort is "" then
      set ausgabe to do shell script befehl with administrator privileges
   else
      set ausgabe to do shell script befehl password passwort with administrator privileges
   end if
on error fehler
   display dialog fehler
end try
MegaChriz
 
Posts: 158
Joined: 16. February 2009 15:04
Location: Amersfoort, The Netherlands
XAMPP Version: 1.8.3-3
Operating System: Mac OS X

Re: Starting Xampp Control Panel without password

Postby kleinweby » 19. May 2010 16:10

Hey,

XAMPP Control don't have an "hidden" switch, to turn of the password dialog. (But you could change the source code, If you wan't to)

MegaChriz's solution looks like it works, but it's a big security hole: If you don't change the permissions on the file, everyone that can access your mac is able to get your password. (And because many uses the same password for thier mac, web services etc. this would be even worse). And even you when you change the permission, every application you run and someone, who may access your computer through your account, can read your password and become root on you computer.

A better solution would be to change/edit the /etc/sudoers file. With it you can configure that only sudo /Applications/XAMPP/xamppfiles/xampp start don't need a password. (Only edit this file through visudoers, not manually!)

(But the best, is to still put the password in every time)

BTW: Do you restart XAMPP that often, that this prompt bothers you?
User avatar
kleinweby
AF Moderator
 
Posts: 393
Joined: 03. August 2005 19:52
Location: Magdeburg
XAMPP Version: 1.8.3-2
Operating System: Mac OS X 10.7

Re: Starting Xampp Control Panel without password

Postby phpmaven » 19. May 2010 23:17

I do web development and I often play around with rewrite rules and other things and will restart Apache quite often.
phpmaven
 
Posts: 2
Joined: 18. May 2010 22:18

Re: Starting Xampp Control Panel without password

Postby mirekstrnad » 23. August 2013 19:03

I have got the some problem. I want to launch xampp without password. I tried this:

To use one of these solutions, do the following:

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

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

Press Ctrl+x, and save when prompted.


But no change. Any ideas? :idea:

Thank you so much :wink:
mirekstrnad
 
Posts: 1
Joined: 23. August 2013 18:53
XAMPP Version: 1.8.2-3
Operating System: Mac OS X 10.8.4

Re: Starting Xampp Control Panel without password

Postby tlau » 04. December 2013 03:03

Hey Guys,

Also looking for help on this one. I have XAMPP installed in a lab of iMacs and the user accounts for the machines do not have local admin rights and they are being prompted for a username and password.
I want the users to be able to open XAMPP without needing the enter any password at all.
Have tried adding the following to /etc/sudoers

obviously I had the shortname of the account not USERNAME

USERNAME ALL= NOPASSWD: /Applications/XAMPP/xamppfiles/xampp
USERNAME ALL= NOPASSWD: /Applications/XAMPP/xamppfiles/manager-osx.app
USERNAME ALL= NOPASSWD: /Applications/XAMPP/xamppfiles/manager-osx.app/Contents/MacOS/osx-intel
USERNAME ALL= NOPASSWD: /Applications/XAMPP/xamppfiles/ctlscript.sh

However this didn't work, any tips?
tlau
 
Posts: 2
Joined: 04. December 2013 02:48
XAMPP Version: 5.5.19
Operating System: OSX Mountain Lion

Re: Starting Xampp Control Panel without password

Postby tlau » 05. December 2013 00:29

I found the following guide, but it is for Linux, does anybody know what the equivalent of this guide would be for Mac OS X?

http://linuxinformations.blogspot.com.au/2013/09/solved-you-need-to-start-xampp-as-root.html?showComment=1386198654191#c4893541553634112749
tlau
 
Posts: 2
Joined: 04. December 2013 02:48
XAMPP Version: 5.5.19
Operating System: OSX Mountain Lion

Re: Starting Xampp Control Panel without password

Postby Nobbie » 06. December 2013 23:40

tlau wrote:I found the following guide, but it is for Linux, does anybody know what the equivalent of this guide would be for Mac OS X?

http://linuxinformations.blogspot.com.a ... 3634112749


There is no need in any case to run Apache as root. Even more: this is a dangerous threat for your server, if a PHP Script is hacked or similar, the hacker runs the script with full root access - a horrible idea! I am running Xampp on Linux for many years and i never needed to run it as root.

Usually there is some misconfiguration with DocumentRoots, Alias etc. which are not granted with sufficient rights (in most cases due to missing knowledge about Linux / OSX). You have to solve these issues, but NEVER run Apache as root.
Nobbie
 
Posts: 7147
Joined: 09. March 2008 13:04

Re: Starting Xampp Control Panel without password

Postby sjk1000 » 27. March 2014 22:59

Any more info on the configuration. Pre-XAMPP 1.8.3-3 this installation ran fine. Now I need to enter a password on opening, and mysql doesn't start. I assume it's something to do with permissions
sjk1000
 
Posts: 1
Joined: 27. March 2014 22:54
XAMPP Version: 5.5.19
Operating System: OSX 10.9

Re: Starting Xampp Control Panel without password

Postby mhulse » 04. August 2014 04:04

Anyone get this working on Mavericks? I've tried several combos/examples and nothing seems to work for me. I'd love to start XAMPP via the control panel or command line without having to sudo. Anyone out there get this to work? If so, what's the key to success?
mhulse
 
Posts: 3
Joined: 15. July 2014 01:33
XAMPP Version: 5.5.19
Operating System: OS X


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 4 guests