I have a simple AppleScript (application) that runs a shell script:
do shell script "sudo killall -TERM java"
which fails with "sudo no tty present and no askpass program specified".
The desired behavior here is to have the OS X password dialog open (hopefully with an offer to save in the Keychain for future use), but (I'm guessing) I'm missing a step that tells the script to launch the necessary "asker" (which surprisingly, doesn't happen by default).
I've tried
do shell script "ssh-askpass Sudo Password | sudo killall -TERM java"
but get an error with that too.
What is the correct way to invoke the OS X password dialing from AppleScript?