• 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: Q: 10.4.2 "Do Shell Script" revision & passwords (Laine Lee)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q: 10.4.2 "Do Shell Script" revision & passwords (Laine Lee)


  • Subject: Re: Q: 10.4.2 "Do Shell Script" revision & passwords (Laine Lee)
  • From: Tim Goeree <email@hidden>
  • Date: Wed, 13 Jul 2005 20:24:24 +0200


Message: 12 Date: Wed, 13 Jul 2005 11:47:48 -0500 From: Laine Lee <email@hidden> Subject: Re: Q: 10.4.2 "Do Shell Script" revision & passwords To: email@hidden Message-ID: <f06230900befaf5bfca22@[129.115.188.236]> Content-Type: text/plain; charset="iso-8859-1"

On 7/13/05 2:58 AM, "Marc S.A. Glasgow" <email@hidden> wrote:


 The installation notes for 10.4.2 update note that there is a
 revision to the "Do Shell Script" command, but doesn't list what the
 revision is. Can anyone clarify the change?

 On a separate quest, how do you pass a "Do Shell Script" that
 requires a password authentication?




Perhaps sudo works as it did in Panther? Could somebody confirm this?

Here's a script I use for rebooting from a different disk.

set  adminpass to text returned of (display
dialog "Enter your admin password. It will be
visible in the text field." default answer ""
default button 2)

do shell script "sudo bless -folder9
\"/Volumes/Hard Disk/System Folder\"" password
adminpass with administrator privileges

Next line for Panther only
do shell script "sudo bless -folder
\"/Volumes/Macintosh_HD/System/Library/CoreServices\"
-bootBlocks -setOF" password adminpass with
administrator privileges

--Next line for Tiger only
do shell script "bless --mount
\"/Volumes/Macintosh_HD\" --setBoot" password
adminpass with administrator privileges

ignoring application responses
     tell application "loginwindow" to «event aevtrest»
end ignoring

If I desire a secure text field, I use a Smile
dialog or an Applescript Studio application.
Both of these solutions are free and place no encumbrances on the user.
I certainly believe it is time for Standard
additions to give us a secure text field, though.


--
Laine

I was puzzled with this myself today. I found that do shell script indeed works again as it did in Panther. You can now again use sudo in your do shell script commands. You could do it in 10.4.0 and 10.4.1 but it was quite nasty the way you had to call it.
Hope this helps.


Tim



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.apple.com/mailman/private/applescript-users/ attachments/20050713/ddc55c56/attachment.html


------------------------------

_______________________________________________
Applescript-users mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/applescript-users

End of Applescript-users Digest, Vol 2, Issue 459
*************************************************


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: Q: 10.4.2 "Do Shell Script" revision & passwords
  • Next by Date: Re: Q: 10.4.2 "Do Shell Script" revision & passwords
  • Previous by thread: "delay sent" for Apple's Mail application
  • Next by thread: Mount volume fails after update to Tiger Server
  • Index(es):
    • Date
    • Thread