Windows 2003的登录取消CTRL+ALT+DEL和关机事件跟踪
运行“gpedit.msc”打开“组策略编辑器”
计算机配置 -> Windows 设置 -> 安全设置 -> 本地策略 -> 安全选项
“交互式登陆:不需要按 CTRL+ALT+DEL”改为“已启用”
显示“关闭事件跟踪程序”
计算机配置 ->管理模板 -> 系统
显示“关闭事件跟踪程序”改为“已禁用”
运行“gpedit.msc”打开“组策略编辑器”
计算机配置 -> Windows 设置 -> 安全设置 -> 本地策略 -> 安全选项
“交互式登陆:不需要按 CTRL+ALT+DEL”改为“已启用”
显示“关闭事件跟踪程序”
计算机配置 ->管理模板 -> 系统
显示“关闭事件跟踪程序”改为“已禁用”
<?php
class Kloxo extends HostingModule {
//Version
protected $version ='1.00';
//Description
protected $description='Kloxo provisioning module';
//Enable AJAX
protected $ajaxLoadValues=true;
//End INIT
//Translations
protected $lang=array(
'english'=>array(
'acc-type'=>'Account Type',
'resource-plan'=>'Plan Name',
'dns-template'=>'DNS Template',
),
'german'=>array(
'acc-type'=>'Account-Typ',
'resource-plan'=>'Plannamen',
'dns-template'=>'DNS Schablone',
)
);
//End Translations
//Server Settings APPprotected $options = array(
'option1' =>array (
'name'=> 'acc-type',
'value' =>false,
'type'=> 'select',
'default'=> array("customer","reseller"),
),
'option2' =>array (
'name'=> 'resource-plan',
'value' => false,
'type'=> 'input',
'default'=>false,
),
'option3' =>array (
'name'=> 'dns-template',
'value' => false,
'type'=> 'input',
'default'=>false,
),
);
//account specific stuff below
protected $details = array(
'option6' =>array (
'name'=> 'domain',
'value' => false,
'type'=> 'input',
'default'=>false
),
'option1' =>array (
'name'=> 'username',
'value' => false,
'type'=> 'input',
'default'=>false
),
'option2' =>array (
'name'=> 'password',
'value' => false,
'type'=> 'input',
'default'=>false
),
);
//End User Specifics
//Start Action Handler
protected $commands = array(
'Suspend','Terminate','ChangePackage','ChangePassword','Create','Unsuspend'//,'getResourcePlansInfo'
);
//connection
private $server_username;
private $server_password;
private $server_hostname;
private $server_ip;
public function connect($connect) {
$this->server_username = $connect['username'];
$this->server_password = $connect['password'];
$this->server_hostname = $connect['hostname'];
$this->server_ip = $connect['ip'];
if($connect['secure']) {
$this->port = 7777;
$this->http = "https";
}
else {
$this->port = 7778;
$this->http = "http";
}
}//endconnection
//Default Kloxo JSON Processing
public function lxlabs_get_via_json($protocol, $server, $port, $param) {
$param = "login-class=client&login-name=admin&login-password=pass&output-type=json&$param";
$url = "$protocol://$server:$port/webcommand.php";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, $param);
$totalout = curl_exec($ch);
$totalout = trim($totalout);
//Replace require JSON.php START X0001
require_once('JSON.php');
//end Replace X0001
$json = new Services_JSON();
$object = $json->decode($totalout);
if (!is_object($object)) {
print("Fatal Error. Got a non-object from the server: $totalout\n");
exit;
}
return $object;
}//end Kloxo's JSON
private function Send($type, $param) {
$http = "http";
if ( $http == "http" ) {
$port = '7778';
}
else {
$port = '7777';
}//end SetDefaultPort
$adminpassword = $this->server_password;
$adminuser = $this->server_username;
$serverloc = $this->server_ip;
$builtparameter = "login-class=client&login-name=$adminuser&login-password=$adminpassword&output-type=json&". $param;
$get = $this->lxlabs_get_via_json($this->http, $serverloc, $this->port, $builtparameter);
return array(
'success'=>true,
);
}//End Send
//CreateServer
public function Create() {
//Build the string
$string = "action=add";
$string .= "&class=client";
$string .= "&v-plan_name=". $this->options['option2']['value'] ."";
$string .= "&v-type=". $this->options['option1']['value'];
$string .= "&v-contactemail=". $this->client_data['email'];
$string .= "&send_welcome_f=off";
$string .= "&v-domain_name=". $this->details['option6']['value'];
$string .= "&v-dnstemplate_name=". $this->options['option3']['value'];
$string .= "&v-password=". $this->details['option2']['value'];
$string .= "&name=". $this->details['option1']['value'];
//Finish building string $string
//send data
$type = null;
$senddata = $this->Send($type, $string);
if ($senddata['success']) {
$this->addInfo('Account has been created');
return true;
}
else {
return false;
}
}//End Create Server
//Suspend
public function Suspend() {
//Prepare string
$string = "class=client";
$string .= "&name=". $this->details['option1'];
$string .= "&action=update";
$string .= "&subaction=disable";
//End Prepare String
$type = null;
//Send Data
$senddata = $this->Send($type, $string);
if ($senddata['success']) {
$this->addinfo('Account Suspended');
return true;
}
else {
return false;
}
}
//End Suspend
//Unsuspend
public function Unsuspend() {
//Prepare string
$string = "class=client";
$string .= "&name=". $this->details['option1'];
$string .= "&action=update";
$string .= "&subaction=enable";
//End Prepare String
$type = null;
//Send Data
$senddata = $this->Send($type, $string);
if ($senddata['success']) {
$this->addInfo('Account has been unSuspended.');
return true;
}
else {
return false;
}
}
//End Suspend
//Kill Account
public function Terminate() {
$string = "action=delete";
$string .= "class=client";
$string .= "name=". $this->details['option1']['value'];
$type = null;
//Send Data
$senddata = $this->Send($type, $string);
if ($senddata['success']) {
return true;
}
else {
return false;
}
}
//Finish the murder
}//End Extension
?>
第一种办法用用fuser,一般远程登陆的都可以直接喀嚓掉,但是如果遇上是在终端上直接登陆的就得用who找出pid然后kill。
[root@Server ~]# w
16:05:59 up 284 days, 1:47, 2 users, load average: 0.22, 0.07, 0.02
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root xvc0 - 02Feb13 6.00s 0.00s 0.00s -bash
root pts/0 X.254.168.X 16:11 0.00s 0.00s 0.00s w
通过w命令查找出pts的ID,然后fuser对其可以下手除掉了。
fuser -k /dev/pts/0
终端上登陆的时候不会有pts,这就得直接对进程下手了.
[root@Server ~]# who -Hu
NAME LINE TIME IDLE PID COMMENT
root xvc0 Feb 2 20:01 . 1313
root pts/0 Apr 28 16:11 . 24240 (X.254.168.X)
使用who -Hu就直接能定位出其PID,然后对其下黑手,
kill -9 1313
上面两种办法就能顺利干掉登陆的账号。
需要挂机/外出或者是只用外接显示器的时候合上盖子Mac会自动休眠,虽然带SSD系统休眠/恢复很快,系统自带没有相关的设置这时候打开sleepless就可以轻松搞定。
sleepless2.8.1下载点这里sleepless2.8.1.zip
sleepless2.8.3下载地址http://download.cnet.com/SleepLess/3000-18512_4-34360.html
解压文件后在选择“Prevent sleep with lid closed,display will NOT sleep” 就好了,未注册情况下会有一个小气泡广告,购买收费授权是9.5美元。
苹果的Retina屏的确非常的清晰分辨率高得出奇,物理尺寸的局限还是让人捉急,在室内时间较多自然要找大显示器外接上这样自然感觉是好多了,也可以按F1将屏幕全黑,另外有种比较淫荡的方法是zai 显示器耳机孔和电源附加放一块磁盘 不用合盖就可以关闭显示器,不合盖的话通过键盘可以散热,各种利弊还是自行选择吧。