• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: lock the screen from the keyboard, win a prize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: lock the screen from the keyboard, win a prize
      • From: Paul Skinner <email@hidden>
    • Re: lock the screen from the keyboard, win a prize
      • From: John Delacour <email@hidden>
References: 
 >Re: lock the screen from the keyboard, win a prize (From: John Delacour <email@hidden>)

  • Prev by Date: Re: duplicate filename error, broken file commands in 10.2?
  • Next by Date: Re: duplicate filename error, broken file commands in 10.2?
  • Previous by thread: Re: lock the screen from the keyboard, win a prize
  • Next by thread: Re: lock the screen from the keyboard, win a prize
  • Index(es):
    • Date
    • Thread