今天是: 收藏本站 设为主页
网站首页 >  技术专栏  >  linux  > 

Pure-ftpd 有关虚拟用户的操作 —— pure-pw 命令

日期:2011-04-11  点击率:1707


-------------------------增加虚拟用户数据库和用户test-------------------------
yajiu@yajiu-desktop:~$ cd /usr/local/pureftpd/bin
yajiu@yajiu-desktop:/usr/local/pureftpd/bin$ sudo ./pure-pw useradd test -u ftpuser -d /ftp/test
[sudo] password for yajiu:
Password:
Enter it again:
yajiu@yajiu-desktop:/usr/local/pureftpd/bin$ sudo ./pure-pw mkdb
yajiu@yajiu-desktop:/usr/local/pureftpd/bin$
注:ftpgroup为系统用户组,ftpuser为系统用户
-------------------------------列出所有FTP用户-------------------------------
yajiu@yajiu-desktop:/usr/local/pureftpd/bin$ sudo ./pure-pw list -f /usr/local/pureftpd/etc/pureftpd.pdb
yajiu@yajiu-desktop:/usr/local/pureftpd/bin$ sudo ./pure-pw list
test /ftp/test/./
yajiu /ftp/test/./
yajiu@yajiu-desktop:/usr/local/pureftpd/bin$
---注:test yajiu 为ftp 用户
-f ftppasswd:存放用户密码信息的文件
-u 用户 uid 一般是系统的一个用户,就是你的ftp用户的家目录的用户
-g 用户组 id
-d 锁定用户在家目录
-m 使 pureftpd.passwd 写进 pureftpd.pdb,使更改生效。
*生成.db文件,使密码生效:sudo ./pure-pw mkdb
*修改用户:sudo ./pure-pw usermod
*删除用户:sudo ./pure-pw userdel 用户名
*更改拥护密码:sudo ./pure-pw passwd 用户名
yajiu@yajiu-desktop:/usr/local/pureftpd/bin$ sudo ./pure-pw passwd yajiu
Password:
Enter it again:
yajiu@yajiu-desktop:/usr/local/pureftpd/bin$
*查看用户详细内容:sudo ./pure-pw show 用户名
yajiu@yajiu-desktop:/usr/local/pureftpd/bin$ sudo ./pure-pw show yajiu
Login : yajiu
Password : $1$CydyGBT0$/a6J8gQFGCoImcERx3tiR/
UID : 2008 (ftpuser)
GID : 2008 (ftpgroup)
Directory : /ftp/test/./
Full name :
Download bandwidth : 0 Kb (unlimited)
Upload bandwidth : 0 Kb (unlimited)
Max files : 0 (unlimited)
Max size : 0 Mb (unlimited)
Ratio : 0:0 (unlimited:unlimited)
Allowed local IPs :
Denied local IPs :
Allowed client IPs :
Denied client IPs :
Time restrictions : 0000-0000 (unlimited)
Max sim sessions : 0 (unlimited)
yajiu@yajiu-desktop:/usr/local/pureftpd/bin$



下一篇:meta viewport使网页在iPhone中满屏显示控制   上一篇:Ubuntu下安装PHP GD