私は何人かの深刻な助けが必要です。サーバーからロックアウトされました。ハッカーが私のパスワードを変更しました。しかし、root アカウントをハッキングすることはできませんでした。まだアクセスできますが、SSH で有効になっていないため、Linux で自分のアカウントにアクセスする必要があります。サーバー上の HTTP にしかアクセスできません。PHP でパスワードを変更できるかどうかを知りたいです。
問題のエラーメッセージ「sudo requires terminal」があります。パスワードを回復するのを手伝ってくれませんか。
<?
$command_exec = 'su root -u root mypwd';
$root_pwd = 'msiamd';
$description = array(
0 => array("pipe","r"),
1 => array("pipe","w"),
2 => array("file","error-output", "a"
));
$process = proc_open($command_exec,$description,$pipes);
if(is_resource($process))
{
fwrite($pipes[0],$root_pwd."\r\n");
fclose($pipes[0]);
echo stream_get_contents($pipes[1]);
print_R($pipes);
fclose($pipes[1]);
proc_close($process);
}
?>