Path: utzoo!censor!geac!torsqnt!sickkids!mark From: mark@sickkids.UUCP (Mark Bartelt) Newsgroups: comp.bugs.4bsd Subject: ftpd doesn't believe passwd(5) Message-ID: <423@sickkids.UUCP> Date: 12 Nov 90 20:03:41 GMT Reply-To: mark@sickkids.UUCP (Mark Bartelt) Organization: Hospital for Sick Children, Toronto Lines: 43 This is one of those "I find it hard to believe nobody has reported this before" bugs, but nonetheless ... In vanilla 4.3bsd on a VAX: ftpd(8) sez ... _F_t_p_d authenticates users according to three rules. [ ... ] 3) The user must have a standard shell returned by getusershell(3). passwd(5) sez ... [ ... ] if the Shell field is null, then /_b_i_n/_s_h is used. But ftpd nonetheless refuses to authorize a user whose shell field in /etc/passwd is null; it won't let a Bourne shell user in unless /bin/sh is explicitly specified in /etc/passwd. One of several ways to fix the problem in ftpd.c/checkuser(): Replace while ((cp = getusershell()) != NULL) if (strcmp(cp, pw->pw_shell) == 0) break; endpwent(); endusershell(); if (cp == NULL) return (0); with if ( !*(pw->pw_shell) ) endpwent(); else { while ((cp = getusershell()) != NULL) if (strcmp(cp, pw->pw_shell) == 0) break; endpwent(); endusershell(); if (cp == NULL) return (0); } Mark Bartelt INTERNET: mark@sickkids.toronto.edu Hospital for Sick Children, Toronto mark@sickkids.utoronto.ca 416/598-6442 UUCP: {utzoo,decvax}!sickkids!mark