Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 12353 - ftpd shadow password error
Summary: ftpd shadow password error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Seemant Kulleen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-17 20:31 UTC by Adam Bolte
Modified: 2003-06-08 15:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix for the shadow password problem (ftpd-0.17-shadowfix.patch,895 bytes, patch)
2003-04-06 06:28 UTC, Frank Straetz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Bolte 2002-12-17 20:31:36 UTC
Problem: ftpd (the package) does not let users log in. It connects ok regardless
of using SSL or  not, and prompts for the username and password, and then goes
on to say that the login details are invalid.

After many hours, I have discovered that this is nothing to do with PAM, but is
in fact a shadow password issue. Using pwunconv and re-attempting to use the
server resulted in success. I've checked the ebuild file, and I can see that the
--without-shadow switch isn't being used, so I suspect that that SSL patch is at
fault but I don't have any more time to test the system without using it - I'm
way behind schedule now.

I was amazed at how few servers actually support SSL, so including this daemon
was most useful. Thanks guys.
Comment 1 Nick Hadaway 2002-12-21 16:03:37 UTC
What ftp client are you using to connect to the ssl enabled ftpd?  I have had 
success using the netkit ftp w/ssl support (also in portage) but I haven't 
been able to verify things working with other ftp clients.
Comment 2 Adam Bolte 2003-01-05 16:41:15 UTC
Sorry about the long wait for a reply - I've been away on holidays. I've tried
many Windows clients - none of them work. I expect that would be irrelevant
however, as I've also tried NetKit's SSL FTP client, and it has exactly the same
problem - and is also fixed by running pwunconv. I'm 100% convinced it is
getting stuck on Shaddow passwords.  :(
Comment 3 Nick Hadaway 2003-01-05 20:43:07 UTC
are you going between.. or are you behind some sort of NAT or firewall?
do you have any log information you can post for me?
Comment 4 Adam Bolte 2003-01-12 16:54:53 UTC
I can't think of any loging information that I can provide. A detailed ftp
client log is just as you would expect if it weren't able to login correctly.

I'm not sure exactly how to analyze /var/log/ftpd/current - it only appears to
have a single (seemingly irrelevant) line in it. Do I need to tail it while
starting the daemon and attempt loging in?

We don't have NAT. We have a firewall, but both computers are behind it - it
doesn't go past the firewall to connect to this ftp server (yet). This server is
in the process of being built.


Comment 5 Frank Straetz 2003-04-05 17:22:03 UTC
I'm having the same problem. The client (I tried several clients) connects to the server, sends username and password and gets disconnected (wrong username or password). It's definately not a problem with the SSL patch. The only line in the system log shows the ftp daemon getting started by xinetd:

Apr  5 23:57:34 [xinetd] START: ftp pid=21985 from=192.168.1.1
Comment 6 Frank Straetz 2003-04-06 06:26:58 UTC
The problem is that the configure script tests whether the system supports shadow passwords or not, but the Makefile compiles ftpd without shadow support no matter what. I've created a patch which should fix the problem. Just apply it right after the SSL patch.
Comment 7 Frank Straetz 2003-04-06 06:28:11 UTC
Created attachment 10270 [details, diff]
Fix for the shadow password problem

Apply right after the SSL patch.
Comment 8 Preston Crow 2003-04-30 17:57:15 UTC
I've got the same problem.  I attached to the server with strace while logging in (connecting from localhost), and there was no access to the shadow password file.

Making matters worse, I'm using NIS for most accounts, and it's not getting those, either.  I did a Google search, and I found patches for using shadow passwords and nis with netkit-ftpd from 1994.  (Search on netkit ftpd shadow nis.)
Comment 9 Seemant Kulleen (RETIRED) gentoo-dev 2003-06-07 03:17:00 UTC
please test the -r1 ebuild.
Comment 10 Frank Straetz 2003-06-08 14:59:08 UTC
Since the patch isn't SSL specific it should get applied outside the if statement, like this:

src_unpack() {
        unpack ${A}
        cd ${S}
        if [ "`use ssl`" ]; then
                epatch ${FILESDIR}/ssl.diff.gz
        fi
        epatch ${FILESDIR}/${P}-shadowfix.patch
}

Other than that it seems to work perfectly. 
Comment 11 Seemant Kulleen (RETIRED) gentoo-dev 2003-06-08 15:12:07 UTC
thanks for checking.  fixed in portage.