|
发表于 2004-8-23 16:50:37
|
显示全部楼层
下面是一段例程,增加一个名字为james的用户,ro
ot密码是 verygood。仅供参考
$sucommand = "su --login root --command";
$useradd = "useradd ";
$rootpasswd = "verygood";
$user = "james";
$user_add = sprintf("%s "%s %s"",$sucommand,$useradd,$user);
$fp = @popen($user_add,"w");
@fputs($fp,$rootpasswd);
@pclose($fp); |
|