Re: Do shell script question - non sudoer user
Re: Do shell script question - non sudoer user
- Subject: Re: Do shell script question - non sudoer user
- From: daniel <email@hidden>
- Date: Sat, 22 Jan 2005 17:47:18 -0800
Bernardo - I think the problem you're running into is that non-admin users cannot (by default) use the sudo command to execute with administrator privileges. I doubt AppleScript's "execute as administrator" can do anything to overcome this security measure.
You might ask yourself, if you're willing to give this user a script that contains an administrator password, why not just make them an administrator?
I think Emmanuel's suggestion to try something less "system-level" than sendmail is probably good. If you want to stick with command line tools, why don't you try the "mail" program? You can use it basically the same way you're using sendmail:
do shell script "mail " & theDestinationEmailAddress & " < " & PathToTextFile
Daniel
On Jan 22, 2005, at 12:18 PM, Bernardo Hoehl wrote:
Hi List!
I have a little AS Studio app that sends out HTML enclosed emails.
The app works fine with me, the administrator of my Box. It uses Postfix to send out the emails.
I am trying to port the app to a non administrator user, but get stuck with administrator privileges.
The original line is:
do shell script "sendmail -bm " & theDestinationEmailAdress & " < " & PathToTextFile
It seems that such a command requires administrator privileges a so, it doens't work.
I tried changing it to :
do shell script "sendmail -bm " & theDestinationEmailAdress & " < " & PathToTextFile password ThePassword with administrator privileges
Then I get the usual "think before you type and respect other users privacy" message as a return of the do shell script line, and the script doesn't work.
Any clues to overide the problem?
Thanks,
Bernardo Höhl
Rio de Janeiro - Brazil
_______________________________________________
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
_______________________________________________
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