Search for "sudo" on freshmeat.net.
I use it to change users passwords from a web page. You can simply allow access to your password file ONLY for user www, and you need another password to access it.
ie: sudo cat /etc/passwd
It will then prompt you for a password. If the password matches, it lets you read that file. Hope this helps.