(ask) Access Root & Create User Dengan PHP


Status
Not open for further replies.

mustafaramadhan

Hosting Guru
boleh bantu methodnya mas ? gambarannya ? atau cotnohnya yang simple aja ?
jalankan di web
1. Pastikan 'disable_functions' tidak termasuk 'exec', 'shell_exec' atau 'system'
2. Anda bisa lihat bagaimana menambah user dengan 'useradd --help'
3. Contoh code php adalah:
Code:
<?php
$comment=''; // comment
$homedir = '/home/mustafa'; // directory
$shellexec = '/bin/bash'; // want ssh access
$password = 'password'; // password
$user = 'mustafa'; // username
exec("useradd -m -c $comment -d $homedir -s $shellexec -p $password $user", $put, $ret);
 

mustafaramadhan

Hosting Guru
boleh bantu methodnya mas ? gambarannya ? atau cotnohnya yang simple aja ?
jalankan di web
1. Pastikan 'disable_functions' tidak termasuk 'exec', 'shell_exec' atau 'system'
2. Anda bisa lihat bagaimana menambah user dengan 'useradd --help'
3. Contoh code php adalah:
Code:
<?php
$comment=''; // comment
$homedir = '/home/mustafa'; // directory
$shellexec = '/bin/bash'; // want ssh access
$password = 'password'; // password
$user = 'mustafa'; // username
exec("useradd -m -c $comment -d $homedir -s $shellexec -p $password $user", $put, $ret);
 

anugrah sandi

Poster 1.0
1. Pastikan 'disable_functions' tidak termasuk 'exec', 'shell_exec' atau 'system'
2. Anda bisa lihat bagaimana menambah user dengan 'useradd --help'
3. Contoh code php adalah:
Code:
<?php
$comment=''; // comment
$homedir = '/home/mustafa'; // directory
$shellexec = '/bin/bash'; // want ssh access
$password = 'password'; // password
$user = 'mustafa'; // username
exec("useradd -m -c $comment -d $homedir -s $shellexec -p $password $user", $put, $ret);

klau untuk login ke vpsnya om make php ?
biar bisa di execute meskipun tidak dijalankan di vps.. semisal di jalankan via cpanel hosting buat execute ke vps linux
 
Status
Not open for further replies.

Top