#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    6
    Rep Power
    0
    On Redhat linux, the command "passwd user" is interactive, so how can I pass data to and from the command with system() or exec()?
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    you can embed a variable in the exec() comand but you should you system if you want to receive feedback

    example
    $str5=system("djpeg -colors 256 -bmp $foo.jpg > $newbmp2",$strr5);

  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    6
    Rep Power
    0
    I a tad bit confused................
    How would I treat the assigning of a password
    if the syntax was:
    system (passwd $username)
    it you then ask me for the password. How do I pass the password.

Similar Threads

  1. PHP locking up with EXEC???
    By Webbywarehouse in forum PHP Development
    Replies: 2
    Last Post: May 17th, 2005, 10:49 PM
  2. Problems with exec()
    By gsoper in forum PHP Development
    Replies: 0
    Last Post: February 13th, 2004, 04:34 AM
  3. "set prompt" using exec or system
    By bln in forum Perl Programming
    Replies: 1
    Last Post: September 15th, 2003, 02:30 PM
  4. exec() on win2k again!
    By binky in forum PHP Development
    Replies: 2
    Last Post: April 22nd, 2002, 08:45 AM
  5. Replies: 0
    Last Post: May 16th, 2001, 04:18 PM

IMN logo majestic logo threadwatch logo seochat tools logo