OpenBSD自带ftpd程序搭建ftp服务器

http://tech.ddvip.com   2007年03月03日    社区交流

本文详细介绍OpenBSD自带ftpd程序搭建ftp服务器

  # adduser -shell /sbin/nologin -home /var

  Use option -silent" if you don't want to see all warnings and questions.

  Reading /etc/shells

  Check /etc/master.passwd

  Check /etc/group

  Ok, let's go.

  Don't worry about mistakes. I will give you the chance later to correct any input.

  Enter username []: ftp

  Enter full name []: anonymous ftpd user

  Enter shell bash csh ksh nologin sh [/sbin/nologin]:ENTER

  Uid [1001]:ENTER

  Login group ftp [ftp]:ENTER

  Login group is ftp". Invite ftp into other groups: guest no

  no

  : ENTER

  Login class daemon default sta. [default]:ENTER

  Enter password []: ENTER # 在此直接按ENTER键。

  这样就可以设置一个不可用的密码。

  Set the password so that user cannot logon? (y/n) [n]: y

  Name: ftp

  Password: ****

  Fullname: anonymous ftpd user

  Uid: 1001

  Gid: 1001 (ftp)

  Groups: ftp

  Login Class: default

  HOME: /var/ftp

  Shell:

  OK? (y/n) [y]: y

  Added user ftp"

  Copy ˉles from /etc/skel to /var/ftp

  Add another user? (y/n) [y]: n

  Goodbye!

  #

  到这里,添加用户的工作就完成了。还需要把系统从'/etc/skel' 复制到$HOME目录的一些"dot ˉles"给删除,以免暴露信息。'dot ˉles'的第一行通常会有一些系统的信息,比如' /.cshrc'文件中就有这么一句:

来源:cnfug    作者:张煌彬    责编:豆豆技术应用

正在加载评论...