免费注册 查看新帖 |

Chinaunix

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

HPUX限制某用户telnet,开放ftp [复制链接]

论坛徽章:
0
发表于 2009-02-27 10:48 |显示全部楼层
[簡單做法](但不安全,如有其他user也設定使用/user/bin/false的shell話)
/etc/passwd of /usr/bin/false. THen add /usr/bin/false to /etc/shells.
[安全做法]
1. Create a normal user account (user=xxxx group=none)
2. Make /usr/bin/false as the start-up program
3. The entry in password file should look something like
xxxx:chus5tya:233:20:,,,:/home/xxxx/./:/usr/bin/false
4. Make sure /usr/bin/false is coded in /etc/shells
5. Create the file /etc/ftpd/ftpaccess and put in the following lines ..
class all john,guest
guestgroup none
noretrieve /etc/passwd
6. Perform a man on ftpaccess if you are not sure about the format
7. Perform chmod 444 ftpaccess
# chown bin:bin ftpaccess
8. Edit /etc/inetd.conf & add "-a" argument to ftpd, its illustrated below
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -a
9. # inetd -c
10. Create the following sub-dirs and files
a) ~xxxx/usr
# chown ???R bin:bin usr
# chmod 555 usr
b) ~xxxx/usr/bin
# chown root bin
# chmod 555 bin
# cp -p /sbin/ls ~xxxx/usr/bin/ls


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/18578/showart_1844832.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP