Re: do shell script and passwords
Re: do shell script and passwords
- Subject: Re: do shell script and passwords
- From: garrett <email@hidden>
- Date: Mon, 10 Jun 2002 09:25:49 -0500
Sometime 'round 06/10/2002 08:03 AM, Matthew Stuckwisch at email@hidden
wasted bandwidth and sent me this:
>
>>> How do I get feedback from a script that the command sent an incorrect
>
>>> password?
>
>>
>
>> You should be getting an execution error, but...
>
>>
>
>>> Am I missing something? Is my correct password being cached somewhere by
>
>>> some part of this process (before I tried to create an error trapping
>
>>> routine for a bad password, I had been using the script with the correct
>
>>> password).
>
>>
>
>> Yep. The admin password (as with sudo) is cached for 5 minutes by
>
>> default -
>
>> see man sudo. Run the command sudo -k to make sure that the cache is
>
>> deleted. If you can still run the process with a dodgy password then
>
>> something is definitely up
>
>>
>
> well I have bad news and worse news....
>
>
>
> some background: rawrequest NEEDS sudo to run
>
>
>
> lets take the command sudo /usr/sbin/rawrequest
>
>
>
> if I do that in the terminal - I need to enter a pw... all good
>
>
>
> now if I wanna do it from AS I can invoke:
>
>
>
> property AdminPass : "mypassword"
>
> do shell script "/usr/sbin/rawrequest" administrator privileges yes
>
> password
>
> AdminPass
>
>
>
> result is ""
>
>
>
> guess what - it runs rawrequest - EVEN WITH A BAD PASSWORD... I have run
>
> sudo -k from the terminal and from AS. I have restarted... I have waited
>
> 15,
>
> 30, 60, 300 mins... in other words... if I invoke this from AS I do NOT
>
> need
>
> a password... as a matter of fact....
>
>
>
> do shell script "/usr/sbin/rawrequest"
>
>
>
> works too. what is going on... could someone actually try this out.. they
>
> can get the rawrequest PKG installer that comes with WhatRoute 1.8 rather
>
> than speculate... because I am doing everything suggested and guess what.
>
> .
>
> no go!
>
>
>
> and whether u may think I have the syntax wrong in the do shell script
>
> command (like not saying "sudo /usr/... etc) it still properly launches
>
> the
>
> process...
>
>
>
WARNING!!!! DON'T ACTUALLY TRY THIS. YOU HAVE BEEN WARNED. [1]
>
do shell script "sudo rm -rf /" with administrator privileges
>
WARNING!!!! DON'T ACTUALLY TRY THIS. YOU HAVE BEEN WARNED. [2]
>
Let's do the ultimate test to see what's really going on.
what's going on is I came this list hoping to learn something about AS and
how to utilize its power to make computing more productive on the Mac -
something u obviously have mastered so well that u can afford to make others
feel like schmucks for even asking such basic questions as the ones I
posted.
it's bad enough that I try to document in detail what the issue is, what I
have done to resolve it, only to have not one, but 2 emails with your
bullshit in my inbox. Not everyone knows this stuff that's why they come
here - to become more proficient with AS. So if u don't have anything to
contribute besides your smartass misplaced commentary, look for some other
outlet for your cravings for attention.
and I'm sorry if I don9t find your sarcasm easily readable through the
medium of email in a tech forum.
-------
garrett
_______________________________________________
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.