Re: how to authenticate in order to run a sudo shellscript?
Re: how to authenticate in order to run a sudo shellscript?
- Subject: Re: how to authenticate in order to run a sudo shellscript?
- From: Andrew Oliver <email@hidden>
- Date: Sun, 29 Feb 2004 22:11:10 -0800
Simple - Don't use sudo in 'do shell script'.
'do shell script' is designed to run the command in a non-interactive
manner.
If you need to run with elevated/root privileges, use the 'do shell script'
mechanism that's designed for this:
do shell script "blah blah blah" with administrator privileges
You'll be prompted for your password with authenticates you in the same way
sudo does, then it runs the command.
Andrew
:)
On 2/29/04 9:45 PM, "email@hidden" <email@hidden> wrote:
>
hi there
>
>
i want to write an applescript what asks the (admin) user to authenticate
>
and then do some backup work as root in a shellscript via sudo.
>
>
just calling a sudo works fine as long as the admin user _has_ authenticated
>
via sudo shorty before. but what can i do in the applescript when the user
>
is not authenticated? how can i test the users auth status in applescript
>
and how can i authenticate the user, so that runing some sudo stuff won't
>
fail?
>
>
thanks for any advice.
>
>
leo
>
_______________________________________________
>
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.
_______________________________________________
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.