hello all,
I am developing a webmail system on linux. I need to add a user into the
system by cgi(written in GNU C), of course, I executed useradd program
and passwd, the problem occurred when I tried to send the password to
passwd using a pipe. my program goes like this
pipe_out = popen ("passwd username", "w");
fprintf (pipe_out, "password\npassword\n");
pclose(pipe_out);
but passwd said "conversation error". anoy way it doesn't work. So
anyone know how to handle this kind of problem? or in an alternative
way to work the task out.
thanks
nick
Sent via Deja.com http://www.deja.com/
Before you buy.