I require a simple script.
To pass a line of code via ssh login to one of many servers.
The php code needs to get the information from a mysql database.
username/ clear text password / account type/ server name.
the command line i need to pass is
/usr/bin/sudo -u root /usr/sbin/adduser -d /home/usersname -m usersname -c accounttype -p crypted password.
I have private ssh keys setup on both server that allow login without password and sudo command to adduser without password.
THis php is to connect to the server and add the command line also to report completion and or errors to admin email.
its to be executed from a build in command that emails the users account details.
the password is in the mysql database as clear text.
but would like to convert it to "crypt" to pass to the server via ssh.