OSX Authentication box

J. Landman Gay jacque at hyperactivesw.com
Tue Jul 1 11:39:21 EDT 2008


Richard Miller wrote:
> Ken,
> 
> What I am doing is turning file sharing on and off on a Mac. The 
> standard shell script one might use to do this doesn't seem to work when 
> the file sharing control panel is in its "locked" state.
> 
>> do shell script "/usr/sbin/AppleFileServer" password "x" with 
>> administrator
>> privileges
>>
>> Turning off with:
>> do shell script "/usr/bin/killall AppleFileServer" password "x" with
>> administrator privileges
> 
> When it is locked, I was using Applescript to unlock it. But that 
> requires putting in the password and then closing the dialog box. That's 
> where the problem is coming from.

I tend to think that's a good thing. If an administrator has locked file 
sharing (or any other preference,) there's a reason. Seems to me it 
would be a security hole if anyone were able to unlock system prefs 
behind the user's back -- malware would certainly take advantage of 
that. I think my solution would be to see if the script succeeds, and if 
not, put up an error dialog informing the user of the problem. Then let 
them make the decision about what to do.

Personally, as a user, I would avoid software that changes my 
preferences like that. I'm not even real comfortable with it turning 
file sharing on and off without my knowledge. I'd much prefer that the 
software tell me about its requirements and let me do it.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list