ghod@drycas.club.cc.cmu.edu
Date: 02/12/93


From: ghod@drycas.club.cc.cmu.edu
Subject: Re: net-0.2 stuff (and presumebly SLS net stuff)
Date: 12 Feb 1993 23:30:55 GMT

In article <1993Feb11.013322.23912@oucsace.cs.ohiou.edu>, sadkins@bigbird.cs.ohiou.edu (Scott W. Adkins) writes:
>
> Ok, I can't hold this in any longer... it has been bugging me for quite
> some time now, and I just have to find out...
>
> It seems that there are quite a few problems with the net (or maybe tcpip)
> stuff that gets distributed for Linux. I will start with the software first:

        [rlogin stuff deleted -- sorry, I don't have rlogin]

> 2) ftp works find going out of the linux box, but using ftp into the box
> does not work:
> a) ftp using "anonymous" or "ftp" --> I can get in using this method,
> but any ftp command I use brings up a message something to the
> effect "Could not load "/lib/libc.so.4" and "Permision Denied".
> I checked this out and do not see why either message is coming
> up... /lib/libc.so.4 is sym linked to /lib/libc.so.4.2 and the
> /lib/libc.so.4.2 has 755 permissions set on it.

Right, here's the deal. When you log into ftp as 'ftp' or 'anonymous', the
ftp daemon doesn't bother to check the password file, so anonymous logins
should work no matter what. Once you're logged in, however, ftpd does a
chroot() to /home/ftp, effectively making /home/ftp your root directory
for the duration of the ftp session. This means that the ftp daemon process
will now consider /home/ftp to be /. Well, if you look in /home/ftp/bin, you'll
see ls and compress and tar hinding in there and it is these commands that
will be used, *not* the ones in the /bin and /usr/bin directories. These
should actually be hard links to the real ones, unless /home on your system
is on a different partition, in which case they'll have to be geniune copies.
The same applies for the libraries these commands reference: you have to
make sure that the links in */home/ftp/lib* are set up right rather than
the ones in /lib. As I said, if /home is on the same partition as / on
your system, than all of these files can be links hard links to the originals
(this saves disk space). If /home is mounted from somewhere else, then you'll
need to copy the files since hard links cannot span across partitions.
(And no, symlinks won't work.)

        
> b) ftp using any other account name that exists does not work...
> it will ask me for a login, I type it in. It asks me for a
> password, and I type it in (and it *is* correct!). It will
> say "Login incorrect" and then "Login failed". I thought it
> would be a problem with shadow passwords, but it turns out
> that this may not be the case... so what gives?

I think this is a problem with shadow passwords. Well, not a problem really, I
just don't think your ftpd has shadow password support compiled into it.
Here's a test you can try: manually copy one of the encypted passwords from
/etc/shadow into the password field for the corresponding user in /etc/passwd,
then try to log in through ftp as this user. (Be careful when you do this:
make sure you copy it exactly and for gosh sakes get rid of it when you're
done. :)

If the login works, then your ftpd is still looking at /etc/passwd rather
than /etc/shadow, which is where all the passwords are. I had this problem
too and fixed it by downloading the source code for ftpd and adding shadow
password support to it.

> I have even looked at and compiled the source of the files above and get
> the same results... I am a bit clueless now.

So were we all at one time, so don't feel bad. Hope this helps in some small
way.

-Bill

> --
> Scott W. Adkins Internet: sadkins@bigbird.cs.ohiou.edu
> ~~~~~~~~~~~~~~~ ak323@cleveland.freenet.edu
> Ohio University of Athens Bitnet: adkins@ouaccvma.bitnet