摘要:最简单的办法就是删除usb模块,或者可以用udev策略来实现插入U盘不相应事件。禁用:mv /lib/modules/`uname -r`/kernel/drivers/usb/storage/usb-storage.ko /lib/modules/`uname -r`/kernel/drivers/usb/storage/usb-storage.ko.bakreboot开启mv /lib/modules/`uname -r`/kernel/drivers/usb/storage/usb-storage.ko.bak /lib/modules/`uname -r`/kernel/drivers
阅读全文
摘要:1 import pexpect 2 newpasswd = 'www.baoyiluo.com' 3 oldpasswd = 'www.longgeek.com' 4 child = pexpect.spawn('passwd') 5 child.expect('(current).*:') 6 print 'old over' 7 child.sendline(oldpasswd) 8 child.expect('New password.*:') 9 child.sendline(newpas
阅读全文
摘要:echo password|passwd --stdin username其中password为修改后的用户密码username为修改的用户名
阅读全文
摘要:打开/etc/vimrc 添加如下内容:set nu显示行号 set et sta sw=4 sts=4 设置tab键等于4个空格:%s/ *$//gc vim开放中替换行未空格为空
阅读全文
摘要:<VirtualHost *:80>DocumentRoot "/var/www/ieecas/ieecas"ServerName www.blog.com 虚拟主机域名<Location "/">SetHandler python-programPythonHandler django.core.handlers.modpythonSetEnv DJANGO_SETTINGS_MODULE ieecas.settings#PythonOption django.root /PythonDebug OnPythonPath &qu
阅读全文
摘要:1.安装apache服务:yum -y install httpd*2.安装php: yum -y install php*3.修改apache的配置文件:/etc/httpd/conf/httpd.conf在相应位置添加如下:AddType application/x-httpd-php .phpLoadModule php5_module modules/libphp5.soDirectoryIndex一行末尾添加 index.php重启apache。4.在/var/www/html/下建立info.php文件,内容如下:<?phpphpinfo();?>用于检测apache上
阅读全文
摘要:关闭触摸鼠标:synclient touchpadoff=1打开触摸鼠标:synclient touchpadoff=0
阅读全文