in reply to Exec Fork Trick

I recently ran accross this article on suid shell scripting and while it doesn't answer your specific question, I think it might be worth reading. Wrappers (shell or Perl) around passwd are somewhat tricky. A few of the "gotchas" are covered here.
http://www.samag.com/documents/s=1149/sam0106a/0106a.htm

old link... http://www.sysadminmag.com/current/0106a/0106a.htm

-Blake