Re: lock the screen from the keyboard, win a prize
Re: lock the screen from the keyboard, win a prize
- Subject: Re: lock the screen from the keyboard, win a prize
- From: "John C. Welch" <email@hidden>
- Date: Sat, 23 Nov 2002 18:05:55 -0500
On 11/23/2002 17:45, "John Delacour" <email@hidden> wrote:
>
>
on SsaverPwordState(fl)
>
set ether to do shell script "ifconfig en0 | grep ether"
>
set en0 to "" & words 2 thru -1 of ether
>
set prefs to POSIX path of (path to preferences)
>
set plist to prefs & "ByHost/com.apple.screensaver." & en0
>
if fl is not {} then
>
do shell script "defaults write " & plist & " askForPassword " & fl
>
end if
>
set PwordState to "defaults read " & plist & " askForPassword "
>
do shell script PwordState
>
end SsaverPwordState
To be technical, none of the prefs files scripts, regardless of stripe
really conform to the contest rules, as you are simply programmatically
doing the same task you would do in the preferences pane, which is not what
Bob wants.
>
>
On another topic altogether, Demon customers have just been told they
>
should set their MTU to 1458 instead of the standard 1500, in order
>
to get the best throughput with broadband, but the helpdesk has no
>
idea how people should do this. I see that it is possible to set
>
this with ifconfig:
>
>
prompt>>> sudo ifconfig en0 mtu 1458
>
>
Now can anyone tell me to have this set at login? Which file should
>
it be written to?
well, probably the safest way would be to create a generic key in your
keychain with your admin password in it, then use keychain scripting to pull
that password out and make it part of a 'do shell script' command. This way,
you aren't embedding passwords in scripts.
john
--
"We ain't making no goddamn corn flakes here."
Col. Charlie Beckwith, founder of Delta Force
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.