由 longdas 在 08-01-2003 15:26 发表:
PureFTPD 虚拟用户,试试。
------------------------ VIRTUAL USERS ------------------------
翻译:龙城辉[[email protected]]
Since release 0.99.2, Pure-FTPd supports virtual users.
自从0.99.2版本之后,Pure-FTPd 开始支持虚拟用户。
Virtual users is a simple mechanism to store a list of users,
虚拟用户是为保存用户列表的一个简单的机制,
with their password, name, uid, directory, etc.
可以和他们各自的密码、名字、uid,所属目录等。
It's just like /etc/passwd. But it's not /etc/passwd. It's a different file, only for FTP.
他就象/etc/passwd文件,但不是/etc/passwd文件。是一个只为FTP服务而使用的文件。
It means that you can easily create FTP-only accounts without messing your system accounts.
这就意味着你在系统帐号之外可以轻松方便的创建FTP帐号。
Additionnaly, virtual users files can store individual quotas, ratios,bandwidth, etc. System accounts can't do this.
另外,虚拟用户文件可以保存在独自的磁盘限额、比率、带宽等,系统帐号可以做不到这一点的。
Thousands of virtual users can share the same system user, as long as they all are chrooted, and they have their own home directory.
上千的虚拟用户可以共享相同的系统用户。。。。他们也可以用相同的用户目录。
So a good thing to do before using virtual users is to create a system user for this. Of course, you can use any existing account like "nobody" (but not root), but it's better to have a dedicated account.
在所有好事之前,你需要为此创建一个系统帐号。当然, 你可以使用一些现成的例如“nobody(可不要是root)”,所以最好使用专有帐号。
Let's create an "ftpgroup" group and an "ftpuser" user.
让我们创建一个“ftpgroup”组和一个"ftpuser "用户。
Linux/OpenBSD:
groupadd ftpgroup
useradd -g ftpgroup -d /dev/null -s /etc ftpuser
FreeBSD:
pw groupadd ftpgroup
pw useradd ftpuser -g ftpgroup -d /dev/null -s /etc
Then, all maintenance of virtual users can be made with the "pure-pw" command. You can also edit the files by hand if you want.
好,所以这些虚拟帐号的操作都可以使用“pure-pw”这个命令。 如果你愿意的话,也可以手工编辑这些文件。
Files storing virtual users have one line per user. These lines have the following syntax:
保存虚拟用户的文件中每行代表一个用户, 这些行包含了以下语法。
1<account>:<password>:<uid>:<gid>:<gecos>:<home directory="">:<upload bandwidth="">:<download bandwidth="">:<upload ratio="">:<download ratio="">:<max connections="" number="" of="">:<files quota="">:<size quota="">:<authorized ips="" local="">:<refused ips="" local="">:<authorized client="" ips="">:<refused client="" ips="">:<time restrictions="">
2
3
4
5
6
7Fields can be left empty (exceptions: account, password, uid, gid, home directory) .
8
9除了 account(帐号), passwor</time></refused></authorized></refused></authorized></size></files></max></download></upload></download></upload></home></gecos></gid></uid></password></account>