Jump to content

Archived

This topic is now archived and is closed to further replies.

jcink

sys_tem(); ... a difficult problem

Recommended Posts

Hi,

I currently have an issue with the sys_tem(); command.

My problem is that I need system to be able to "reply" to the response of this command:
sys_tem("pure-pw useradd username -u ftpuser -g ftpgroup -d /var/www/s/host/username -N 200");

What this is, exactly, is a Pure-FTPd command line that adds a user in. The issue that when you do it, it then asks for password to be typed twice before adding.

"Passwrd: " is outputted on the page. I don't know of a way to reply to that. I tried after that:

sys_tem("testpassword");
sys_tem("testpassword");

The next two sys_tems seem to just open up brand new windows, doing nothing. Is there any way to continue the sys_tem(); if you get what I mean?

Thanks in advance,
jcink

edit: I know it isn't called sys_tem but if you try to post with that word in your post you get blocked!!!! >=(

Share this post


Link to post
Share on other sites
Try this

ex_ec("pure-pw useradd username -u ftpuser -g ftpgroup -d /var/www/s/host/username -N 200\ntestpassword\ntestpassword");

ex_ec is not the actual command it is "exec"


hth

Share this post


Link to post
Share on other sites
hmm thanks, but Nope, not working. I tried those \ns in the sys_tem(); command too, not working.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.