Chinaunix首页 | 论坛 | 博客
  • 博客访问: 199258
  • 博文数量: 21
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 657
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-05 19:07
文章分类
文章存档

2009年(6)

2008年(15)

我的朋友

分类:

2009-02-27 10:48:46

[簡單做法](但不安全,如有其他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

阅读(1900) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~