Page 1 of 1

problem to execute shell command in php

Posted: Mon Sep 01, 2008 9:48 am
by rockobop
Hello everyone

I am trying to do my q users can change the password

with the following

Code: Select all

 
$con=ssh2_connect('192.168.0.1', 22);
ssh2_auth_password($con, "user", "password");
$shell=ssh2_shell($con, 'xterm');
fwrite( $shell, "passwd login\n");
fwrite( $shell, "mdp courant\n");
fwrite( $shell, "test\n");
fwrite( $shell, "test\n"); 
 


as quoted on this page

http://forum.ubuntu-fr.org/viewtopic.php?id=197425

but my French and English is bad and can not translate well, I do not know if MKE could lend a hand

excuse my bad English

greetings

Re: problem to execute shell command in php

Posted: Wed Sep 03, 2008 11:09 am
by rockobop
any suggestion?

Re: problem to execute shell command in php

Posted: Wed Sep 03, 2008 12:46 pm
by starram
Please elaborate, what exactly you want to do.

Re: problem to execute shell command in php

Posted: Thu Sep 04, 2008 3:37 pm
by rockobop
change the password for my Linux users through interface php

Re: problem to execute shell command in php

Posted: Tue Sep 09, 2008 3:06 pm
by rockobop
any suggestion?