in reply to Executing htpasswd from within web cgi
Do that with system, or when you want the text a command prints, backticks.
After Compline,Zaxo