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

Re: remember in keychain


  • Subject: Re: remember in keychain
  • From: Peter Baxter <email@hidden>
  • Date: Wed, 19 Dec 2007 21:02:27 +1100

If you would like to see if the password is successful, then a slight alteration to run the script in Terminal will help:


tell application "Keychain Scripting"
set myKey to "Your Administrator 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 "echo " & adminpwd & " | sudo periodic monthly"
tell application "Terminal"
activate
delay 0.5
do script myScript
end tell



On 19/12/2007, at 2:05 PM, Vince Angeloni wrote:

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




My choice early in life was either to be a piano-player in a whorehouse or a politician.  And to tell the truth, there's hardly any difference.
-- Harry S. Truman (circa 1962)

Peter Baxter
email@hidden



 _______________________________________________
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

References: 
 >Re: Re: remember in keychain (From: Vince Angeloni <email@hidden>)

  • Prev by Date: Re: Bundle Content drawer - what's it good for?
  • Next by Date: Re: How to associate a file with a script
  • Previous by thread: Re: Re: remember in keychain
  • Next by thread: Re: AppleScript wish list
  • Index(es):
    • Date
    • Thread