• 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: Re: remember in keychain
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: remember in keychain


  • Subject: Re: Re: remember in keychain
  • From: Vince Angeloni <email@hidden>
  • Date: Tue, 18 Dec 2007 21:05:34 -0600

Can someone else test this script? When I run it here, it still runs without an error even if I tell it to use my .Mac password instead of my admin password.

I think that unless you can check the std err in the shell call, you won't be able to detect "bad passwords", so this may be failing silently at the shell call. I'm not sure of this and would welcome correction from anyone with better info.

Vince

--------
tell application "Keychain Scripting"
set myKey to "name of your admin account in keychain"
tell keychain 1
set chosenKey to the first key whose name is myKey as string
set adminpwd to the password of chosenKey as string
end tell
end tell
set myScript to "do shell script {\"echo\" & quoted form of " & adminpwd & " | sudo periodic daily ;echo 'Periodic tasks performed'\"}"


display dialog "The daily, maintenance scripts have completed."
------------
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: remember in keychain
      • From: Peter Baxter <email@hidden>
  • Prev by Date: Re: Bundle Content drawer - what's it good for?
  • Next by Date: Re: remember in keychain
  • Previous by thread: Re: remember in keychain
  • Next by thread: Re: remember in keychain
  • Index(es):
    • Date
    • Thread