• 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 with do shell script with password?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sudo with do shell script with password?


  • Subject: Re: Sudo with do shell script with password?
  • From: garbanzito <email@hidden>
  • Date: Mon, 22 Apr 2002 15:23:23 -0600

at 2002 04 22, 13:50 -0400, they whom i call Jason Bourque wrote:
Hello,


I am doing a Sudo command within a do shell script.

do shell script " mount_smbfs -W myworkgroup //username@netbiosname/share
./myshare"

(i assume the "sudo" was erroneously snipped from the above command.)

it is possible to send the password in the command string:

do shell script "echo password | sudo -S 'commands'"

but usually more convenient to use:

do shell script "commands" with administrator privileges [password "foo"]

which will prompt for the password if not provided. i missed
this feature until someone nudged me, and it keeps coming
up. definitely FAQ.

--
steve harley email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Sudo with do shell script with password? (From: Jason Bourque <email@hidden>)

  • Prev by Date: Re: FileMaker Pro question
  • Next by Date: Re: Number of Decimal Places
  • Previous by thread: Sudo with do shell script with password?
  • Next by thread: Read RTF in OS X?
  • Index(es):
    • Date
    • Thread