为Serv-U提供在线修改密码功能
日期:2007年5月18日 作者: 查看:[大字体 中字体 小字体]-
由于日常工作的需要,单位使用Serv-U架设了一个FTP服务器,可是自从接手之后发现存在着一个非常严重的问题,这个FTP服务器是对外公开的,居然很多用户都没有设置密码。如果强制要求所有人设置密码又必须在服务器上设,这样岂不是要所有人都把自己的密码告诉管理员吗,毕竟很多人习惯于用同一个密码的。怎么办呢?最好的办法当然是能够提供一个Web页面来提供密码的修改功能。
说干就干,在网上查了一下,有一种方法是使用Serv-U自身提供的ODBC功能,用数据库来存储密码,通过直接对数据库进行操作来实现密码的修改功能,但经过考试这种方法并不太可行。因为这个FTP服务器已经运行了一年之久,里面已有将近六十个用户,要将这些用户从Ini文件移植到数据库出现错误的几率还是比较高的,还不如直接对INI文件进行操作来得干脆。
首先是要搞清楚Serv-U的用户信息在INI文件中是如何保存的,密码又是如何加密的。INI文件的结构比较简单,修改密码的话只要找到以[User=@UserID1]节,并修改其下的PassWord键的值即可。@UserID指的是用户的登录ID。
1[GLOBAL]
2Version=6.1.0.5
3PacketTimeOut=300
4
5
6
7[Domain1]
8User1=
9User2=
10User3=
11
12
13
14[USER=abc1]
15Password=niE383DC3710266ECAE04A6B3A18A2966D
16HomeDir=D:\
17AlwaysAllowLogin=1
18ChangePassword=1
19TimeOut=600
20Note1="Wizard generated account"
21Access1=D:\
22
23
用户密码的加密方法可以在Ser-U官方网站的知识库查到
http://rhinosoft.com/KBArticle.asp?RefNo=1177&prod=su
Manually Entering Encrypted Passwords into the ServUDaemon.ini File
To generate an encrypted password, first two random characters (the 'salt' - in the range a..z, A..Z) are added to the beginning of the clear-text password. This is then hashed using MD5 and the resulting hash is hex-encoded. The result of this is written as plain-text starting with the 2 salt characters followed by the hex-encoded hash.For a user account in the .ini file, this will look like:
Password=cb644FB1F31184F8D3D169B54B3D46AB1A
The salt is the string "cb", the MD5 hash is "644FB1F31184F8D3D169B54B3D46AB1A".
When verifying a user's password, Serv-U will do the same. It parses the salt from the user's stored password (ie. "cb" in this case), prepends it the password the user sent to it by the client, MD5 hashes it, and compares the result with the stored hash. If the values are equal, then the entered password is correct.
- [1] [2] [3] [4] [5] [6] [7] [8] 下一页
-
- 为Serv-U提供在线修改密码功能 相关文章:
- 为Serv-U提供在线修改密码功能 相关软件
- 特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作
- 者.文章版权归文章原始作者所有.对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转
- 载的文章有版权问题请联系编辑人员,我们尽快予以更正. 转载请注明来源:http://www.hackhome.com
上一篇:解决SqlTransaction用尽的问题(SQL处理超时)
下一篇:用QQ来制作个性化动态论坛签名
精品推荐
热点TOP10
- ·CuteFTP最新版V4.2.5build3.7.1官方简体中文版破解
- ·FTP协议的分析和扩展
- ·BT 电驴 电骡 FTP下载及找片技巧
- ·为Serv-U提供在线修改密码功能
- ·穿越隔离墙!小文件传送利器Tftpd32
- ·详解:FTP登陆错误问题完全分析
- ·Serv-U :快速构建功能强大的FTP 服务器
- ·充分利用 FTP分类账户设置经验谈
- ·总结:FTP错误代码详解
- ·中文解释PureFTPd配置文件
- ·中国人自己的FTP软件“网络传神”教程
- ·用Serv-U构建功能强大FTP服务器
- ·用wu-ftpd架设FTP服务器(1)
- ·用Serv-U打造完美的FTP服务器
- ·寻寻觅觅—揭开FTP无法访问网络之谜
- ·创建"用户隔离"模式的FTP站点
- ·在资源管理器中操作FTP站点更简单
- ·上传也提速:FlashFXP技巧三则
- ·精典:FTP 命令行使用精萃
- ·与Windows上最小FTP工具ffftp亲密接触
