动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
电脑书籍下载:程序设计书籍 | 数据库教程书籍 | 平面与多媒体书籍 | 网络通讯书籍 | 系统管理书籍 | 网络安全书籍 | 认证考试书籍
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库 > Oracle教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Sybase教程,Access教程,DB2教程,数据库安全,数据库文摘
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Oracle教程 ]的信息



本月文章推荐
.以 spfdisk 分割硬盘的一个范例(.
.读书总结:Oracle 软件结构.
.oracle数据库 SQLPlus 使用技巧.
.上海Oracle OpenWorld大会纪事-0.
.ORACLE培训教程(1)-ORACLE系统概.
.讲解Oracle数据库的sysdba权限登.
.对刚接触oracle的人比较有用的一.
.解析Oracle 8i/9i的计划稳定.
.ORACLE性能诊断―学习statspack笔.
.查看一个Oracle表的数据定义语句.
.Oracle SQL依然无可替代-Masteri.
.ORACLE数据库恢复技术.
.在Oracle数据库里用存储过程定期.
.如何用保存数据库连接参数代码及.
.利用 Oracle 10g 技能学习 DB2 9.
.讲解Oracle数据库提供的多种安全.
.*[原创]*安装文档ORACLE9i for s.
.Oracle数据库安全策略分析 (三).
.Oracle任命第十二个董事 Seligma.
.一个关于DATEBASE TRIGGER的问题.

vsftpd-1.1.3配制实例之五:VIRTUAL_USERS

发表日期:2008-2-9 |



  This example shows how to set up vsFTPd / PAM with "virtual users".
  A virtual user is a user login which does not exist as a real login on the
  system. Virtual users can therefore be more secure than real users, beacuse
  a compromised account can only use the FTP server.
  Virtual users are often used to serve content that should be Accessible to untrusted users, but not generally accessible to the public.
  Step 1) Create the virtual users database.
  We are going to use pam_userdb to authenticate the virtual users. This needs
  a username / passWord file in "db" format - a common database format.
  To create a "db" format file, first create a plain text files with the
  usernames and password on alternating lines.
  See example file "logins.txt" - this specifies "tom" with password "foo" and
  "fred" with password "bar".
  Whilst logged in as root, create the actual database file like this:
  db_load -T -t hash -f logins.txt /etc/vsftpd_login.db
  (Requires the Berkeley db program installed).
  This will create /etc/vsftpd_login.db. Obviously, you may want to make sure
  the permissions are restricted:
  chmod 600 /etc/vsftpd_login.db
  For more information on maintaing your login database, look around for
  documentation on "Berkeley DB", e.g.
  http://www.sleepycat.com/docs/utility/index.Html
  Step 2) Create a PAM file which uses your new database.
  See the example file vsftpd.pam. It contains two lines:
  auth required /lib/security/pam_userdb.so db=/etc/vsftpd_login
  account required /lib/security/pam_userdb.so db=/etc/vsftpd_login
  This tells PAM to authenticate users using our new database. Copy this PAM
  file to the PAM Directory - typically /etc/pam.d/
  cp vsftpd.pam /etc/pam.d/ftp
  Step 3) Set up the location of the files for the virtual users.
  useradd -d /home/ftpsite virtual
  ls -ld /home/ftpsite
  (which should give):
  drwx------ 3 virtual virtual 4096 Jul 30 00:39 /home/ftpsite
  We have created a user called "virtual" with a home directory "/home/ftpsite".
  Let's add some content to this download area:
  cp /etc/hosts /home/ftpsite
  chown virtual.virtual /home/ftpsite/hosts
  Step 4) Create your vsftpd.conf config file.
  See the example in this directory. Let's go through it line by line:
  anonymous_enable=NO
  local_enable=YES
  This disables anonymous FTP for security, and enables non-anonymous FTP (which
  is what virtual users use).
  write_enable=NO
  anon_upload_enable=NO
  anon_mkdir_write_enable=NO
  anon_other_write_enable=NO
  These ensure that for security purposes, no write commands are allowed.
  chroot_local_user=YES
  This makes sure that the virtual user is restricted to the virtual FTP area
  /home/ftpsite we set up above.
  guest_enable=YES
  guest_username=virtual
  The guest_enable is very important - it activates virtual users!
And
  guest_username says that all virtual users are mapped to the real user
  "virtual" that we set up above. This will also determine where on the
  filesystem the virtual users end up - the home directory of the user
  "virtual", /home/ftpsite.
  listen=YES
  listen_port=10021
  This puts vsftpd in "standalone" mode - i.e. not running from an inetd. This
  means you just run the vsftpd executable and it will start up. This also
  makes vsftpd listen for FTP requests on the non-standard port of 10021 (FTP
  is usually 21).
  pasv_min_port=30000
  pasv_max_port=30999
  These put a port range on passive FTP incoming requests - very useful if
  you are configuring a firewall.
  Copy the example vsftpd.conf file to /etc:
  cp vsftpd.conf /etc/
  Step 5) Start up vsftpd.
  Go to the directory with the vsftpd binary in it, and:
  ./vsftpd
  If all is well, the command will sit there. If all is not well, you will
  likely see some error message.
  Step 6) Test.
  Launch another shell session (or background vsftpd with CTRL-Z and then "bg").
  Here is an example of an FTP session:
  ftp localhost 10021
  Connected to localhost (127.0.0.1).
  220 ready, dude (vsFTPd 1.1.0: beat me, break me)
  Name (localhost:chris): tom
  331 Please specify the password.
  Password:
  230 Login sUCcessful. Have fun.
  Remote system type is UNIX.
  Using binary mode to transfer files.
  ftp> pwd
  257 "/"
  ftp> ls
  227 Entering Passive Mode (127,0,0,1,117,135)
  150 Here comes the directory listing.
  226 Transfer done (but failed to open directory).
  ftp> size hosts
  213 147
  ftp>
  Comments:
  The password we gave was "foo".
  Do not be alarmed by the "failed to open directory". That is because the
  directory /home/ftpsite is not world readable (we could change this
  behaviour if we wanted using anon_world_readable_only=NO but maybe we want
  it this way for security.
  We can see that we have access to the "hosts" file we copied into the virtual
  FTP area, via the size command.
  logins.txt
  tom
  foo
  fred
  bar
  vsftpd.conf
  anonymous_enable=NO
  local_enable=YES
  write_enable=NO
  anon_upload_enable=NO
  anon_mkdir_write_enable=NO
  anon_other_write_enable=NO
  chroot_local_user=YES
  guest_enable=YES
  guest_username=virtual
  listen=YES
  listen_port=10021
  pasv_min_port=30000
  pasv_max_port=30999
  vsftpd.pam
  auth required /lib/security/pam_userdb.so db=/etc/vsftpd_login
  account required /lib/security/pam_userdb.so db=/etc/vsftpd_login
  VIRTUAL_USERS_2
  This example shows how to extend the "VIRTUAL_USERS" example to reflect
  a slightly more complex setup.
  Let's assume that we want two types of virtual user - one that can only browse
  and download content, and another that can upload new content as well as
  download existing content.
  To achieve this setup, we can use use of vsftpd's powerful per-user
  configurability (new in v1.1.0).
  In the previous virtual user example, we created two users - tom and fred.
  Let's say that we want fred to have write access to upload new files whilst
  tom can only download.
  Step 1) Activate per-user configurability.
  To activate this powerful vsftpd feature, add the following to
  /etc/vsftpd.conf:
  user_config_dir=/etc/vsftpd_user_conf
  And, create this directory:
  mkdir /etc/vsftpd_user_conf
  Step 2) Give tom the ability to read all files / directories.
  At the end of the last example, we noted that the virtual users can only
  see world-readable files and directories. We could make the /home/ftpsite
  directory world readable, and upload files with world-read permission. But
  another way of doing this is giving tom the ability to download files which
  are not world-readable.
  For the tom user, supply a config setting override for
  anon_world_readable_only:
  
  echo "anon_world_readable_only=NO" > /etc/vsftpd_user_conf/tom
  Check it out - login as tom and now "ls" will return a directory listing!

  Log in as fred and it won't.
  NOTE - restart vsftpd to pick up the config setting changes to
  /etc/vsftpd.conf. (Advanced users can send SIGHUP to the vsftpd listener
  process).
  Step 3) Give fred the ability to read all files / directories and create
  new ones but not interfere with existing files.
  echo "anon_world_readable_only=NO" > /etc/vsftpd_user_conf/fred
  echo "write_enable=YES" >> /etc/vsftpd_use
上一篇:Linux Cluster 人气:431
下一篇:vsftpd-1.1.3配制实例之四:VIRTUAL_HOSTS 人气:420
浏览全部Oracle教程的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-7-25 WikyBlog v1.7.0.1 多国语言版
2008-7-25 乐彼网上开店系统(56770 Eshop)
2008-7-25 赛特网站管理系统sitecms v3.6.0
2008-7-25 Modoer多功能点评系统 v1.0.1 Bu
2008-7-25 Shangducms Teamsuit! v1.1.0 开
2008-7-25 幻影动漫网视频系统(Ppdong) v1.
2008-7-25 acteecompany企业网站建设系统 v
2008-7-25 恒浪整合管理系统 ims v4.1 ACCE
2008-7-25 艺术图库系统 v1.0 beta
2008-7-19 UltraEdit 简体中文增强版 14.10
2008-7-19 CentOS 5.2 i386 LiveCD
2008-7-19 Snapture多功能相机 v1.4
2008-7-19 iAcces中文输入法 v1.0Build016
2008-7-19 Cookbook烹饪秘籍 v2.5
2008-7-19 苹果专用DVD转换工具 v1.1.59汉化
2008-7-19 Modem修复软件ZiPhone修改版04.0
2008-7-19 AgileMessenger即时通讯工具美化
2008-7-19 Sketches画图软件 v0.7b6破解版


  发表评论
姓 名: 验证码:
内 容:
[ 汉字翻译拼音 ] [ 广告代码 ] [ 符号对照表 ] [ 进制转换 ] [ 经典小工具 ] [ 个税计算 ] [ 汉字简繁转换 ] [ 普通单位换算 ] [ 公制单位换算 ]
[ 生辰老黄历 ] [ 国内电话区号 ] [ 国家代码与域名缩写 ] [ 文字加密解密 ] [ 健康查询 ] [ 万年历 ] [ 手机号码查询 ] [ ip搜索 ] [ Google PR查询 ]
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号