Re: Sudo with do shell script with password?
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.