From owner-freebsd-bugs@FreeBSD.ORG Thu Jan 20 10:20:32 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8029F16A4CE for ; Thu, 20 Jan 2005 10:20:32 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B1CE43D39 for ; Thu, 20 Jan 2005 10:20:32 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0KAKWdm093182 for ; Thu, 20 Jan 2005 10:20:32 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0KAKWYV093181; Thu, 20 Jan 2005 10:20:32 GMT (envelope-from gnats) Date: Thu, 20 Jan 2005 10:20:32 GMT Message-Id: <200501201020.j0KAKWYV093181@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Ceri Davies Subject: Re: misc/76494: passwd does not indicate a successful change - causes problems with Samba password sync X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ceri Davies List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2005 10:20:32 -0000 The following reply was made to PR misc/76494; it has been noted by GNATS. From: Ceri Davies To: Rob Mason Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: misc/76494: passwd does not indicate a successful change - causes problems with Samba password sync Date: Thu, 20 Jan 2005 10:17:50 +0000 On Thu, Jan 20, 2005 at 09:46:31AM +0000, Rob Mason wrote: > The passwd command on 4-STABLE output the text "passwd: done" when a > password was changed. This feature is used by the Samba-3 port to > indicate a successful change in the 'passwd chat' config option. > 5-STABLE does not indicate that the password change is successful What's wrong with a return status? > Apply the following patch: > > *** 157,164 **** > --- 157,165 ---- > /* set new password */ > pam_err = pam_chauthtok(pamh, 0); > pam_check("pam_chauthtok"); > > end: > + if (pam_err == PAM_SUCCESS) fprintf(stderr, "Password Changed\n"); > pam_end(pamh, pam_err); > exit(pam_err == PAM_SUCCESS ? 0 : 1); > } It also strikes me that this is not the same as the 4.X output; why? Ceri