Bug 47066

Summary: FTP logins fail if the logname has fewer than four characters
Product: [Retired] Red Hat Linux Reporter: Need Real Name <tpurdy>
Component: wu-ftpdAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-07-04 03:03:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2001-07-02 22:31:03 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.7 [en] (WinNT; U)

Description of problem:
I can't do a successful  FTP login, when the logname has less than 4 characters.  useradd will create these accounts and 
I can telnet to them fine.    As long as the logname has four or more characters, I can successfully FTP into the machine.    
It wouldn't bother me at all, but I've got an obstinate and with narrow limits of flexibliity.

How reproducible:
Always

Steps to Reproduce:
1. FIddle /etc/ftpaccess, ftphosts, and the xinetd profile to allow open access to the machine. 
2. Create two accounts jtrn and ted 
3. telnet into each of the accounts.  Attempt to ftp into each account
	

Actual Results:  Red Hat Linux release 7.1 (Seawolf)
Kernel 2.4.2-2 on an i686
login: jtrn
Password:
Last login: Mon Jul  2 14:06:08 from marcab5.ibexbsc.com
/home3/ibex/jtnsinc/trn (1025)$exit
Red Hat Linux release 7.1 (Seawolf)
Kernel 2.4.2-2 on an i686
login: ted
Password:
Last login: Mon Jul  2 16:19:37 from 192.168.2.3
/home/ibex/ted (1025)$exit

/root (1025)$ftp marcab5
Connected to marcab5.ibexbsc.com.
220 marcab5.ibexbsc.com FTP server (Version wu-2.6.1-16) ready.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (marcab5:root): jtrn
331 Password required for jtrn.
Password:
230 User jtrn logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> close
221-You have transferred 0 bytes in 0 files.
221-Total traffic for this session was 319 bytes in 0 transfers.
221 Thank you for using the FTP service on marcab5.ibexbsc.com.
ftp> open marcab5
Connected to marcab5.ibexbsc.com.
220 marcab5.ibexbsc.com FTP server (Version wu-2.6.1-16) ready.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (marcab5:root): ted
331 Password required for ted.
Password:
530 Login incorrect.
Login failed.
ftp>



Expected Results:  Successful initiation of an ftp session for user id "ted"

Additional info:

tail of /var/log/messages:
Jul  2 16:19:57 marcab5 login(pam_unix)[5373]: session opened for user jtrn by (uid=0)
Jul  2 16:19:57 marcab5  -- jtrn[5373]: LOGIN ON pts/13 BY jtrn FROM 192.168.2.3
Jul  2 16:20:08 marcab5 login(pam_unix)[5373]: session closed for user jtrn
Jul  2 16:20:18 marcab5 login(pam_unix)[5501]: session opened for user ted by (uid=0)
Jul  2 16:20:18 marcab5  -- ted[5501]: LOGIN ON pts/13 BY ted FROM 192.168.2.3
Jul  2 16:20:22 marcab5 login(pam_unix)[5501]: session closed for user ted
Jul  2 16:21:18 marcab5 login(pam_unix)[5555]: session opened for user ted by (uid=0)
Jul  2 16:21:18 marcab5  -- ted[5555]: LOGIN ON pts/13 BY ted FROM 192.168.2.3
Jul  2 16:21:21 marcab5 su(pam_unix)[5608]: session opened for user root by ted(uid=500)
Jul  2 16:21:36 marcab5 ftpd[5662]: FTP LOGIN FROM marcab5.ibexbsc.com [192.168.2.2], jtrn
Jul  2 16:21:44 marcab5 ftpd[5662]: FTP session closed
Jul  2 16:21:57 marcab5 ftpd[5664]: failed login from marcab5.ibexbsc.com [192.168.2.2]
Jul  2 16:22:29 marcab5 ftpd[5664]: FTP session closed

Not sure why it's saying uid=0 for the telnet sessions.   Here's the relevant passwd file entries
root:x:0:0:root:/root:/usr/bin/ksh
ted:x:500:577:ted:/home/ibex/ted:/usr/bin/ksh
jtrn:x:1002:1000:jtrn user:/home3/ibex/jtnsinc/trn:/bin/ksh

/etc (1031)$grep root group
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
disk:x:6:root
wheel:x:10:root

Comment 1 Need Real Name 2001-07-04 03:03:35 UTC
Brain fart.  The user-id 0 stuff is init launching new sessions.

Comment 2 Bernhard Rosenkraenzer 2001-07-10 16:04:30 UTC
[root@zell SPECS]# ftp localhost
Connected to localhost (127.0.0.1).
220 zell.stuttgart.redhat.com FTP server (Version wu-2.6.1-18) ready.
Name (localhost:root): br
331 Password required for br.
Password:
230 User br logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>


Works for me...

The actual difference seems to be that your user ted uses /usr/bin/ksh as 
default shell. That's not one of the shells we're shipping; if you didn't add 
it to /etc/shells manually, wu-ftpd is doing the right thing.



Comment 3 Need Real Name 2001-07-11 08:08:21 UTC
My goof.    Added /usr/bin/ksh to /etc/shells and it works now.  Not sure where the /usr/bin.ksh reference came from; probably something chained 
forward from ancient SCO OpenServer days.