You could also modify the permissions of the application so that it can be used by a regular user without requiring a password; 'ping' is one such application.
This is how you would do this:
Code:
# chown root:root <app>
# chmod u+s <app>
where <app> is the name of your application. You must be logged in as root (or use sudo) to perform the commands above.