I want to test to see if an admin password entered by a user is valid. In theory something like this should work:
set user_pass to "ii"
try
do shell script "sudo -k"
set test_password to do shell script ("ls /private/var/root/") password user_pass with administrator privileges
on error myerr
log "the password is invalid"
end try
However, instead of being trapped by try, Leopard puts up an authentication dialog. I believe this did not happen on Tiger, but could be mistaken.