• 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: "parag vibhute" <email@hidden>
  • Date: Mon, 17 Dec 2007 17:45:09 +0530

Hi,

There is another way to achieve this. You can pass administrator password to script as an argument.
Following code may help you:

on run argv
     set adminpwd to item 1 of argv
     do shell script "echo " & quoted form of adminpwd & " | sudo -S daily"
     display dialog "The daily, maintenance scripts have completed."
end run

Regards,
Palav


On Dec 16, 2007 10:21 PM, tom evans <email@hidden> wrote:
Hi,

I'm a noob to scripting, but what i'm trying to do is automate the maintenance routines.

I have the script:

do shell script "sudo daily" with administrator privileges
display dialog "The daily, maintenance scripts have completed."


(and weekly & monthly), and I trigger them from Ical. They work fine, but I have to put in the admin password every time.

I don't want to hard-code my admin password, is there a way to get a check-box "add to keychain" or "remember in keychain", so the next time I enter the password will be the last?

Thanks,

Tom

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden



--

There are many things in your life that will catch your eye but only a few will catch your heart....pursue those'.
 _______________________________________________
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>
    • Re: remember in keychain
      • From: Peter Baxter <email@hidden>
References: 
 >remember in keychain (From: tom evans <email@hidden>)

  • Prev by Date: Re: Choose from list problems
  • Next by Date: Re: How to associate a file with a script
  • Previous by thread: remember in keychain
  • Next by thread: Re: remember in keychain
  • Index(es):
    • Date
    • Thread