• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: do shell script and passwords
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script and passwords


  • Subject: Re: do shell script and passwords
  • From: garrett <email@hidden>
  • Date: Mon, 10 Jun 2002 05:35:32 -0500

Sometime 'round 06/07/2002 04:25 PM, Alex Robinson at
email@hidden described:

>> 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...



-------
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.

  • Follow-Ups:
    • Re: do shell script and passwords
      • From: Alex Robinson <email@hidden>
    • Re: do shell script and passwords
      • From: Matthew Stuckwisch <email@hidden>
References: 
 >Re: do shell script and passwords (From: Alex Robinson <email@hidden>)

  • Prev by Date: Re: URL Access uploads
  • Next by Date: Re: do shell script and passwords
  • Previous by thread: Re: do shell script and passwords
  • Next by thread: Re: do shell script and passwords
  • Index(es):
    • Date
    • Thread