免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2823 | 回复: 4

freebsd 如何关闭匿名ftp [复制链接]

论坛徽章:
0
发表于 2009-04-27 21:18 |显示全部楼层
freebsd中 用sysinstall开了匿名ftp,现在我想要关闭匿名ftp,怎么样关闭

ps
通过用户名验证登陆的ftp服务不关闭,只想关闭匿名ftp

通过修改/etc/xinetd 开通的ftp

论坛徽章:
0
发表于 2009-04-27 22:32 |显示全部楼层
不能没人知道吧?

论坛徽章:
0
发表于 2009-04-28 21:38 |显示全部楼层
修改配置文件应该可以

论坛徽章:
89
水瓶座
日期:2014-04-01 08:53:31天蝎座
日期:2014-04-01 08:53:53天秤座
日期:2014-04-01 08:54:02射手座
日期:2014-04-01 08:54:15子鼠
日期:2014-04-01 08:55:35辰龙
日期:2014-04-01 08:56:36未羊
日期:2014-04-01 08:56:27戌狗
日期:2014-04-01 08:56:13亥猪
日期:2014-04-01 08:56:02亥猪
日期:2014-04-08 08:38:58程序设计版块每日发帖之星
日期:2016-01-05 06:20:00程序设计版块每日发帖之星
日期:2016-01-07 06:20:00
发表于 2009-04-28 21:45 |显示全部楼层
rc.conf

论坛徽章:
0
发表于 2009-04-29 20:23 |显示全部楼层
FTP设置

配置ftp(系统自带)
引用:
# ee /etc/inetd.conf
复制内容到剪贴板
代码:
ftp        stream        tcp        nowait        root        /usr/libexec/ftpd        ftpd        -l -h
//去掉ftp前的#号
引用:
# ee /etc/rc.conf
复制内容到剪贴板
代码:
inetd_enable="YES"
启动ftp
引用:
# killall -HUP inetd
添加ftp用户组
引用:
# pw groupadd ftpgroup -g 10001
添加ftp用户
引用:
# adduser
Username:ftp
Full name:
Uid (Leave empty for default):1001
Login group [ftpuser]: ftpgroup
Login group is ftpgrou. Invite ftpuser into other groups? []:
Login class [default]:
Shell (sh csh tcsh zsh nologin) [sh]:
Home directory [/home/ftpuser]:/usr/www
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the account after creation? [no]:
Username                :        ftpuser
Password                :        *****
Full Name                :
Uid                                :        1001
Class                        :
Groups                        :        ftpgroup
Home                        :        /usr/www
Shell                        :        /bin/sh
Locked                        :        no
OK? (yes/no)        :        yes
adduser: INFO: Successfully added (ftpuser) to the user database.
Add another user? (yes/no): no
Goodbye!
禁止匿名用户登录
引用:
# ee /etc/ftpusers
复制内容到剪贴板
代码:
anonymous
@guest
设定用户使用目录
引用:
# ee /etc/ftpchroot
复制内容到剪贴板
代码:
ftpusr /usr/www
设置用户磁盘限额
引用:
# ee /etc/rc.conf
复制内容到剪贴板
代码:
enable_quotas="YES"
check_quotas="YES"
引用:
# ee /etc/fstab
复制内容到剪贴板
代码:
/dev/ad0s1f        /usr        ufs                rw,userquota,groupquota                2        2
引用:
# quotacheck -av
# repquota –a
# edquota –u ftpuser
复制内容到剪贴板
代码:
/usr: kbytes in use: 0, limits (soft = 100000, hard = 100020)        # soft是警告容量,hard是强制容量
引用:
# edquota –t
复制内容到剪贴板
代码:
/usr: block grace period: 1 minutes, file grace period: 1 minutes
引用:
# quotaon -a
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP