Actually, if you really want to avoid IPC for this, you could just edit (hey, wordwrap! Thanks!) your /etc/master.passwd (or /etc/passwd, shame on you for not shadowing) file directly with Perl, and issue a mkpwdb command once you're finished.
Of course, it's pretty important to use file-locking so that your program doesn't step on others' (or its own!) toes.
If I ever finish the program that does what you are talking about (as well as much more), I will post some code here. Pray it doesn't kill me first.
--TQuid