• 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: How to Run a "sudo" Terminal Command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to Run a "sudo" Terminal Command


  • Subject: Re: How to Run a "sudo" Terminal Command
  • From: Axel Luttgens <email@hidden>
  • Date: Sat, 12 Dec 2015 13:34:53 +0100

> Le 12 déc. 2015 à 13:20, Dave a écrit :
>
> Hi All,
>
> I’d like to execute a Shell Script with the “sudo” command, e.g.
>
> sudo some-command
>
> If I do this from the terminal it prompts me for my password how can I do this from an AppleScript, ideally I’d like the Standard Mac OS Password Dialog to appear…..

Hello Dave,

The equivalent of a "sudo" may be achieved this way (note the lack of "sudo" in the script to be executed):

	do shell script "some-command" with admnistrator privileges

and will raise a standard dialog.

HTH,
Axel



 _______________________________________________
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: How to Run a "sudo" Terminal Command
      • From: Dave <email@hidden>
    • Re: How to Run a "sudo" Terminal Command
      • From: Dave <email@hidden>
References: 
 >How to Run a "sudo" Terminal Command (From: Dave <email@hidden>)

  • Prev by Date: How to Run a "sudo" Terminal Command
  • Next by Date: Re: How to Run a "sudo" Terminal Command
  • Previous by thread: How to Run a "sudo" Terminal Command
  • Next by thread: Re: How to Run a "sudo" Terminal Command
  • Index(es):
    • Date
    • Thread