I require a simple script to pass some information to a linux server from a remove php script.
i have created ssh private keys that allow login without a password, and sudo user permitions to allow the command to run.

what i would like is a very basic idea of how to connect and pass a command line via a php script to the linux server.
id like to grab some variables from a mysql database such as username and password as well.

/usr/bin/sudo -u root /usr/sbin/adduser -d /home/usersname -m usersname -p cryptedpassword

where usersname and cryptedpassword are the variables.

can someone point me the right way?

    why would you even think of replying to a serious post like that.
    guess phpbuilder.com doesnt support newbs eh.

      Sure, there's even a forum dedicated to newbies. It's called "Newbies". By the time you start posting here, it is assumed that you know how to use Google.

        thx sysera
        now weedpacket has a good answer to give the next passer by.
        great tut.

          Originally posted by webmazter
          thx sysera
          now weedpacket has a good answer to give the next passer by.
          great tut.

          Yeah, I can tell them, "the ninth hit returned by Google".

            Write a Reply...