Re: sudo permission in a script
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
@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
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
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