jcink Posted June 6, 2006 Share Posted June 6, 2006 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,jcinkedit: I know it isn't called sys_tem but if you try to post with that word in your post you get blocked!!!! >=( Quote Link to comment https://forums.phpfreaks.com/topic/11298-sys_tem-a-difficult-problem/ Share on other sites More sharing options...
samshel Posted June 6, 2006 Share Posted June 6, 2006 Try thisex_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 Quote Link to comment https://forums.phpfreaks.com/topic/11298-sys_tem-a-difficult-problem/#findComment-42312 Share on other sites More sharing options...
jcink Posted June 7, 2006 Author Share Posted June 7, 2006 hmm thanks, but Nope, not working. I tried those \ns in the sys_tem(); command too, not working. Quote Link to comment https://forums.phpfreaks.com/topic/11298-sys_tem-a-difficult-problem/#findComment-42644 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.