Luckily, the user did not actually run my code. But for a while he had everyone in the chatterbox thinking he did. "I tried what you said and now my computer won't boot. What do I do next?"
There seem to be a lot of questions recently in the Chatterbox about "How can I run adduser to create a unix acount in my CGI script?" Personally, I think that if someone can't figure out how to do this at all, they certainly aren't going to figure out how to do it securely if I just spoon feed them the answer. And any Right Answer other than "Just Don't" is too long to fit in a chatterbox response.