*BSD News Article 41818


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.netspace.net.au!serval.net.wsu.edu!netnews.nwnet.net!oracle.pnl.gov!osi-east2.es.net!cronkite.nersc.gov!dancer.ca.sandia.gov!overload.lbl.gov!lll-winken.llnl.gov!sol.ctr.columbia.edu!startide.ctr.columbia.edu!wpaul
From: wpaul@ctr.columbia.edu (Bill Paul)
Newsgroups: comp.os.386bsd.questions
Subject: Re: ftp-server on FreeBSD
Date: 29 Jan 1995 03:23:55 GMT
Organization: Columbia University Center for Telecommunications Research
Lines: 41
Message-ID: <3gf1ob$nll@sol.ctr.columbia.edu>
References: <D33EC2.HK4@mv.mv.com>
NNTP-Posting-Host: startide.ctr.columbia.edu
X-Newsreader: TIN [version 1.2 PL2]

Daring to challenge the will of the almighty Leviam00se,
Coranth Gryphon (shaman@mv.mv.com) had the courage to say:

: Hi. I am trying to set up anonymous FTP under FreeBSD 2.0R

: I followed the directions in the ftpd man pages, and almost
: everything works.

: The remaining problem is that I only ever get UID's for file
: ownership (ie. no names). I have tried as many different passwd
: file configurations in ~ftp/etc as I can think of, specifically
: (1) copy of /etc/passwd (2) copy of /etc/master.passwd (3) modified
: copy of /etc/passwd with the 10 field format

: Anyone know what I might be doing wrong?

: -coranth

FreeBSD (and 4.4BSD in general, I believe) use a password database in
addition to the ASCII-format /etc/passwd file. You have to place a dummy
version of /etc/pwd.db in ~ftp/etc too, since that's what will be used
for UID to user name lookups. /etc/pwd.db is generated from /etc/passwd
by pwd_mkdb, which is in turn invoked by vipw. Check the man pages for
both pwd_mkdb and vipw to see how they work. What you need to to is
generate a pwd.db file using ~ftp/etc/passwd as source. ~ftp/etc/passwd
should be in the usual 7-field format. For the purposes of anynymous FTP
you won't need master.passwd or spwd.db files: these are used for storing
actual passwords, but for anon FTP you never need passwords in your
dummy password database. In some cases, you can even do without the
dummy password database entirely.

-Bill

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~T~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Bill Paul            (212) 854-6020 | System Manager
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Møøse Illuminati: ignore it and be confused, or join it and be confusing!
~~~~~~~~ FreeBSD 2.1.0-Development #1: Fri Jan 20 14:28:17 EST 1995 ~~~~~~~~~