Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Start MAMP at login without password request' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Start MAMP at login without password request
Authored by: Andrew J Freyer on Apr 21, '10 09:32:06AM
@Superboy is absolutely correct. This is NOT a safe way to store the user's administrator password.

Try keychain scripting or using terminal command "Security"


set theUserName to do shell script ("security  find-generic-password -gl ****KEYCHAIN ENTRY NAME*** | grep \"acct\" | cut -c 19-99 | sed 's/\"//g'")

set thePassword to do shell script ("security 2>&1 >/dev/null find-generic-password -gl ****KEYCHAIN ENTRY NAME*** | cut -c 11-99 | sed 's/\"//g'")
Or, using Keychain scripting (which is pretty slow):


tell application "Keychain Scripting"
	set myKey to first key of current keychain whose name is "****KEYCHAIN ENTRY NAME***"
	set theUserName to account of myKey
	set thePassword to password of myKey
end tell
---
Easier location-based computing: with Airport Location, app for 10.6. It's an early Beta, so please report bugs!

http://airportlocation.blogspot.com


[ Reply to This | # ]
Start MAMP at login without password request
Authored by: Andrew J Freyer on Apr 21, '10 09:35:47AM

I should note that you'll have to setup, in keychain, a new Generic key with the password that you need to use. Then, it should be named *** KEYCHAIN ENTRY NAME ****

---
Easier location-based computing: with Airport Location, app for 10.6. It's an early Beta, so please report bugs!

http://airportlocation.blogspot.com



[ Reply to This | # ]
Start MAMP at login without password request
Authored by: damex on Jul 31, '10 01:07:25PM

Thanks for the code, Andrew!

I have packaged it up in a nice little app that allows you to start and stop MAMP's Apache and MySQL servers with a single click and doesn't ask for a password each time. It has a nice icon as well :)

You can download it from my blog:
http://www.46palermo.com/blog/run-mamp-without-password-easy-way/

Regards,
Damian



[ Reply to This | # ]