Re: do shell script and passwords (epilogue)
Re: do shell script and passwords (epilogue)
- Subject: Re: do shell script and passwords (epilogue)
- From: garrett <email@hidden>
- Date: Thu, 13 Jun 2002 01:51:50 -0500
Sometime 'round 06/12/2002 12:19 PM, so and so (garbanzito) at such n such
(email@hidden) graced my inbox with this brilliant thought:
>
at 2002 06 07, 22:27 +0100, they whom i call Daisy Whitman wrote:
>
> you can check the password before with this script:
>
>
>
> set myPassword to "..."
>
> set myresult to "wrong"
>
> try
>
> set myresult to (do shell script "sudo -v"
>
> password myPassword with administrator
>
> privileges)
>
> [...]
>
>
>
just noticed this and wanted to note that sudo -v will
>
*succeed* with an incorrect password if the user's sudo
>
timestamp is still alive. so to really verify the password,
>
precede it with sudo -k.
thanx for all your help. it seems that rawrequest doesn't need sudo to work
(hence why it would work regardless of the password).
but I did get some cool routines to check for a valid password (including
clearing the cache prior to a check).
thanx everyone.
-------
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.