注册 登录
LUPA开源社区 返回首页

jiang001的个人空间 http://www.lupaworld.com/?263754 [收藏] [复制] [分享] [RSS]

我的博客

Linux中配置仅本地用户使用的服务器

已有 503 次阅读2011-6-7 14:21 |系统分类:IT技术

  ftpusers和user_list文件中均包含一份FTP用户名的列表,两个文件虽然都用于FTP用户的控制,但具体作用存在一些差别。

  ftpusers文件:该文件中包含的用户账户将被禁止登录vsftpd服务器,不管该用户是否在user_list文件中出现。通常将root、bin、daemon等特殊用户列在该文件中,禁止用于登录FTP服务。默认如下所示:

  [root@linux-01 ~]# cat /etc/vsftpd/ftpusers

  # Users that are not allowed to login via ftp

  root

  bin

  daemon

  adm

  lp

  sync

  shutdown

  halt

  mail

  news

  uucp

  operator

  games

  nobody

  user_list文件:该文件中包含的用户账户可能被禁止登录,也可能被允许登录,具体在vsftpd.conf主配置文件中决定。默认如下所示:

  [root@linux-01 ~]# cat /etc/vsftpd/user_list

  # vsftpd userlist

  # If userlist_deny=NO, only allow users in this file

  # If userlist_deny=YES (default), never allow users in this file, and

  # do not even prompt for a password.

  # Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers

  # for users that are denied.

  root

  bin

  daemon

  adm

  lp

  sync

  shutdown

  halt

  mail

  news

  uucp

  operator

  games

  nobody

  当存在“userlist_enable=YES”的配置项时,user_list文件生效,如果配置“userlist_deny=YES”,则仅禁止列表中的用户登录,如果配置“userlist_deny=NO”,则仅允许列表中的用户登录。

  配置主配置文件

  在主配置文件中把anonymous_enable=YES改成NO,添加“userlist_deny=NO”配置项,并把允许访问的用户添加到user_list文件中,就可以实现仅本地允许用户使用的FTP文件服务器了。

 已同步至 jiang001的微博

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册
验证问答 换一个 验证码 换一个

关于LUPA|人才芯片工程|人才招聘|LUPA认证|LUPA教育|LUPA开源社区 ( 浙B2-20090187 浙公网安备 33010602006705号   

返回顶部