Date: Fri, 2 Jul 1999 22:21:48 -0600 (MDT) From: Jonathon Doran <doranj@Colorado.EDU> To: peter@sweda.com.hk (Peter Kok) Cc: doranj@Colorado.EDU, freebsd-questions@FreeBSD.ORG Subject: Re: I am new... Message-ID: <199907030421.WAA26287@ucsu.Colorado.EDU> In-Reply-To: <377D727E.1829636F@sweda.com.hk> from "Peter Kok" at Jul 3, 99 10:16:30 am
next in thread | previous in thread | raw e-mail | index | archive | help
> how to set up ftp server. it allows login in as "anonymous" and the password as > 'email address' The ftp daemon (ftpd) which ships with FreeBSD is capable of doing this fairly easily. I like wu_ftpd (from Washington University) better for a number of reasons. If you'd like to use wu_ftpd, it is in the ports collection. However, to get you started, I'll discuss ftpd. All of this info is available in the man page, which you can read by typing "man ftpd". However, you'll need the man pages installed before this will work. And since my earlier directions were for installing just bin, I'll assume that these aren't available. If you have the time, I suggest pulling down some additional directories before doing your install. The compat2*, and manpages directories are very useful. Back to ftpd... FreeBSD will already have this installed, and minimally configured when you perform the install. To allow anonymous ftp access you'll need to create a user named "ftp". The "adduser" script will walk you through this process (prompting you for information). I'd create the account with /sbin/nologin as the shell. This is what adduser will look like whe you add the ftp account: Enter username [a-z0-9_-]: ftp Enter full name []: FTP User Enter shell csh date no nologin sh [sh]: nologin Enter home directory (full path) [/home/ftp]: Uid [1003]: Enter login class: default []: Login group ftp [ftp]: Login group is ``ftp''. Invite ftp into other groups: guest no [no]: Enter password []: (The Uid will probably be different) As an additional (optional) step, I'd remove the password for the ftp account. This further prevents unauthorized access to the ftp account. Use "vipw" and change the ftp line to look like this: ftp:*:1003:1003::0:0:FTP User:/home/ftp:/sbin/nologin All I changed was the password field (between the first and second ':'), making it '*'. This character can never occur in a Unix password, so this guarantees that nobody can su to this account. (As opposed to being able to login) When someone anonymously ftps into your machine, ftpd will place them in /home/ftp (or whatever directory you specified as ftp's home). They will be unable to leave this subtree, since it appears as '/' to their ftp client. Jon Doran To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907030421.WAA26287>