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

Click here to return to the 'Toggle Web Sharing with an AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Toggle Web Sharing with an AppleScript
Authored by: jaydisc on Aug 29, '12 04:25:59PM

I disagree with the method for password collecting.

The "password" argument could be removed from `do shell script` and that command would automatically prompt the user for authentication, NOT just a password, but also a username (in case the user running the script wasn't an admin themselves, which NO ONE should be day-to-day), and it would do it using the standard OS security escalation dialog. So, I would remove the first three lines, as well as "password pw " before "with administrator privileges".

[ Reply to This | # ]