• 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: sudo permission in a script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sudo permission in a script


  • Subject: Re: sudo permission in a script
  • From: "koenig.yvan" <email@hidden>
  • Date: Wed, 17 Sep 2014 20:41:01 +0200


Le 17/sept./2014 à 19:59, Omar K N <email@hidden> a écrit :



@Kevin, Thanks, I hadn’t seen it.

@Yvan,

Ok, but if I don’t have any security problems, then how to pass by a password, so there is no need to enter it every time?


do shell script "echo " & (quoted form of ExportList) & "|tr -d \"\\t\"|/usr/local/bin/dayone new" with administrator privileges



with best regards,
Omar K N
Stockholm, Sweden


On 17 Sep 2014, at 17:30, email@hidden wrote:

If I understand correctly your script, the instruction is executed only once so it’s not a big problem compared to security problems involved by a scheme passing the required password.


Do shell script belongs to the Osax Standard Additions so it's in the dictionary of this tool that informations are available.
In this resource we may read :
do shell script v : Execute a shell script using the ‘sh’ shell
do shell script text : the shell script to execute.
[as type class] : the desired type of result; default is text (UTF-8)
[administrator privileges boolean] : execute the command as the administrator
[user name text] : use this administrator account to avoid a password dialog (If this parameter is specified, the “password” parameter must also be specified.)
[password text] : use this administrator password to avoid a password dialog
[altering line endings boolean] : change all line endings to Mac-style and trim a trailing one (default true)
→ text : the command output
For answers to commonly asked questions about do shell script, see Technical Note TN2065.

Yvan KOENIG (VALLAURIS, France) mercredi 17 septembre 2014 20:40:51



 _______________________________________________
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: sudo permission in a script (From: Omar K N <email@hidden>)

  • Prev by Date: missing Path?
  • Next by Date: Re: can't make alias into type text
  • Previous by thread: Re: sudo permission in a script
  • Next by thread: missing Path?
  • Index(es):
    • Date
    • Thread