Re: do shell script and passwords
Re: do shell script and passwords
- Subject: Re: do shell script and passwords
- From: Alex Robinson <email@hidden>
- Date: Mon, 10 Jun 2002 16:20:57 +0100
>
if u do invoke the sudo command with a bad password in the terminal (even if
>
it's not needed), it will fail. however buy using AS to do the same thing,
>
it totally ignores the error and lets things proceed. wouldn't u think that
>
despite it not needing a pw to launch the process that the syntax alone
>
would trigger an error? don't get me wrong I'm glad it works, but it doesn't
>
make me feel good that I issued bad (or unnecessary) commands and it let it
>
fly.
I don't fully understand what's going on here but just to clarify my
previous post...
>
>>>
do shell script "/usr/sbin/rawrequest" password AdminPass with
administrator privileges
<<<<
If you use this "correct" line of applescript and provide an incorrect
password (that is, as long as the sudo cache is not in effect) the do shell
script will indeed not be carried out (regardless of whether sudo is
actually required or not)
>
>>>
do shell script "/usr/sbin/rawrequest" administrator privileges yes
password AdminPass
<<<<
If you use your original line, the script gets carried out regardless.
The real question is why the Applescript compiler allows the line to get
through and what it thinks "administrator privileges yes password
AdminPass" actually means seeing that it just gets ignored at runtime.
_______________________________________________
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.