Jump to content


Photo

sys_tem(); ... a difficult problem


  • Please log in to reply
2 replies to this topic

#1 jcink

jcink
  • Members
  • Pip
  • Newbie
  • 6 posts

Posted 06 June 2006 - 04:46 AM

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!!!! >=(
http://jcink.com - home of projects, games, forums, hosting.

#2 samshel

samshel
  • Members
  • PipPipPip
  • Advanced Member
  • 837 posts

Posted 06 June 2006 - 05:29 AM

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
Cheers,
SamShel
-----------------------------------------------
--: FUTURE IS LINUX :--
-----------------------------------------------

#3 jcink

jcink
  • Members
  • Pip
  • Newbie
  • 6 posts

Posted 07 June 2006 - 12:41 AM

hmm thanks, but Nope, not working. I tried those \ns in the sys_tem(); command too, not working.


http://jcink.com - home of projects, games, forums, hosting.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users