I know this isn't what you asked, but this is a very bad idea in general. What you are basically doing is giving a non-trusted user (nobody,www,whatever) access to your most crucial system files.
It -can- be done, by writing a setuid program (don't know if linux allows setuid shell scripts, Solaris doesn't) and calling it from php with exec or system, or using something like sudo.
My advice would be to take a step back and analyze -why- you want to do this, and find a better solution.
For example, if you are trying to add email accounts, you could use ldap or a database and one of the many email packages (postfix, cyrus) that can auth against these instead of the system files. At least that way if your web server is compromised they don't have shell access.
Just my .02.
Ken Mugrage