解决:ping命令不是内部或外部命令,也不是可运行的程序或批处理文件

这是系统环境变量的问题,我XP曾安装了工商银行的安全证书(金邦达),结果造成命令行下的system32目录的所有命令无法直接使用。

解决在命令行方式下输入:

set path=%path%;C:\WINNT\System32\;//Win 2000

set path=%path%;C:\WINDOWS\System32\;//Winxp

Virtual Hosting With PureFTPd And MySQL

1 Install MySQL And phpMyAdmin

This can all be installed with one single command:

apt-get install mysql-server mysql-client libmysqlclient12-dev phpmyadmin

You will be asked a few questions:

Enable suExec? <– Yes
Configuring mysql-server (Install Hints) <– OK
Which web server would you like to reconfigure automatically? <– apache, apache2
Do you want me to restart apache now? <– Yes

Create a password for the MySQL user root (replace yourrootsqlpassword with the password you want to use):

mysqladmin -u root password yourrootsqlpassword
2 Install PureFTPd With MySQL Support

For Debian there is a pre-configured pure-ftpd-mysql package available. Install it as a standalone daemon like this:

apt-get install pure-ftpd-mysql

Run pure-ftpd from inetd or as a standalone server? <– standalone
Do you want pure-ftpwho to be installed setuid root? <– No

Then we create an ftp group (“ftpgroup“) and user (“ftpuser“) that all our virtual users will be mapped to. Replace the group- and userid 2001 with a number that is free on your system:

groupadd -g 2001 ftpgroup
useradd -u 2001 -s /bin/false -d /bin/null -c “pureftpd user” -g ftpgroup ftpuser

3 Create The MySQL Database For PureFTPd

Now we create a database called pureftpd and a MySQL user named pureftpd which the PureFTPd daemon will use later on to connect to the pureftpd database:

mysql -u root -p
CREATE DATABASE pureftpd;
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON pureftpd.* TO ‘pureftpd’@’localhost’ IDENTIFIED BY ‘ftpdpass’;
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON pureftpd.* TO ‘pureftpd’@’localhost.localdomain’ IDENTIFIED BY ‘ftpdpass’;
FLUSH PRIVILEGES;

Replace the string ftpdpass with whatever password you want to use for the MySQL user pureftpd. Still on the MySQL shell, we create the database table we need (yes, there is only one table!):

USE pureftpd;

CREATE TABLE ftpd (
User varchar(16) NOT NULL default ”,
status enum(‘0′,’1’) NOT NULL default ‘0’,
Password varchar(64) NOT NULL default ”,
Uid varchar(11) NOT NULL default ‘-1’,
Gid varchar(11) NOT NULL default ‘-1’,
Dir varchar(128) NOT NULL default ”,
ULBandwidth smallint(5) NOT NULL default ‘0’,
DLBandwidth smallint(5) NOT NULL default ‘0’,
comment tinytext NOT NULL,
ipaccess varchar(15) NOT NULL default ‘*’,
QuotaSize smallint(5) NOT NULL default ‘0’,
QuotaFiles int(11) NOT NULL default 0,
PRIMARY KEY (User),
UNIQUE KEY User (User)
) TYPE=MyISAM;

4 Configure PureFTPd

Edit /etc/pure-ftpd/db/mysql.conf

MYSQLSocket      /var/run/mysqld/mysqld.sock
#MYSQLServer     localhost
#MYSQLPort       3306
MYSQLUser       pureftpd
MYSQLPassword   ftpdpass
MYSQLDatabase   pureftpd
#MYSQLCrypt md5, cleartext, crypt() or password() - md5 is VERY RECOMMENDABLE uppon cleartext
MYSQLCrypt      md5
MYSQLGetPW      SELECT Password FROM ftpd WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MYSQLGetUID     SELECT Uid FROM ftpd WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MYSQLGetGID     SELECT Gid FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MYSQLGetDir     SELECT Dir FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MySQLGetBandwidthUL SELECT ULBandwidth FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MySQLGetBandwidthDL SELECT DLBandwidth FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MySQLGetQTASZ   SELECT QuotaSize FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MySQLGetQTAFS   SELECT QuotaFiles FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")

设置Windows Vista系统启动时自动登录

如果使用Windows Vista的默认安全设置,那么,在系统每次启动后都需要用户在登录界面输入用户名与密码,这可以防止系统被不当用户使用,在一定程度上提高系统的安全性。不过,对于那些非多人共用的计算机用户而言,有时候可能会厌烦这样每次都要登录的方式,而希望让Windows Vista启动后自动以默认用户的身份登录系统。

要实现Windows Vista的自动登录,有很多种方式可以实现,如通过组策略编辑器等。但相对而言,大都有些繁琐,往往要求用户有一定的操作水平。近日,shellrevealed发布了一个可帮助用户简化设置步骤的自动登录设置工具。

实现Windows Vista的自动登录
该工具可从这里下载。

需要指出的是,该工具除了简化自动登录的设置外,还在一定程度上提高了Windows Vista的安全性:Windows Vista在启用自动登录后,会在注册表中以明码的方式保存用户密码或TPM安全论证码,这就存在密码泄露的可能性,而该工具则可将注册表中的明码加密,并移出注册表,让偷窥者无从得知真正的密码。

已经通过其他方法设置了自动登录的用户可以检查“HKEY_LOCAL_MACHINE \Software \Microsoft \WindowsNT \CurrentVersion \Winlogon”分支,查看其中是否存在“defaultpassWord”项及是否以明码方式保存,如果是的话最好也使用此工具将保存的密码加密。

下面简要介绍一下该工具的用法,首先,进入命令行,并将操作用户提升至管理员权限:
2007697251963457.jpg

  • Autologon.exe /Set /Username:<用户名> – 设定系统以<用户名>的身份自动登录:
  • Autologon.exe /Set /Username:<用户名> /Count:3 – 设定系统在之后的三次启动中以<用户名>的身份自动登录;
  • Autologon.exe /Delete – 禁用自动登录;
  • Autologon.exe /Migrate – 加密以其他方式设定自动登录的用户密码

注:任何第三方工具都不能完全保证不会影响Windows Vista的稳定,这点在使用前需切记。

Windows XP 设置自动登录

最直接的方法:
在windows xp中单击“开始→运行”
输入control userpasswords2 ,然后进入“用户账户”操作窗口

取消对“要使用本机,用户必须输入用户名及密码”项的选择。点[确定]
在接下来弹出的对话框中输入你想让电脑每次自动登录的账户名(如owen)及其密码。[确定]
下次启动自动登陆就直接是这个用户了