NetBSD Problem Report #18474

Received: (qmail 22905 invoked by uid 605); 30 Sep 2002 03:25:56 -0000
Message-Id: <200209300325.g8U3PqT08510@pell.ka8zrt.com>
Date: Sun, 29 Sep 2002 23:25:52 -0400 (EDT)
From: cinnion@ka8zrt.com
Sender: gnats-bugs-owner@netbsd.org
Reply-To: cinnion@ka8zrt.com
To: gnats-bugs@gnats.netbsd.org
Subject: bug in useradd
X-Send-Pr-Version: 3.95

>Number:         18474
>Category:       bin
>Synopsis:       useradd/usermod fails with new MD5 passwords
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 30 03:26:00 +0000 2002
>Closed-Date:    Fri May 23 06:23:19 +0000 2003
>Last-Modified:  Fri May 23 06:23:19 +0000 2003
>Originator:     Douglas Wade Needham
>Release:        NetBSD 1.6
>Organization:
>Environment:
System: NetBSD cyteen 1.6 NetBSD 1.6 (GENERIC) #0: Sun Sep 8 19:43:40 UTC 2002 autobuild@tgm.daemon.org:/autobuild/i386/OBJ/autobuild/src/sys/arch/i386/compile/GENERIC i386
Architecture:i386
Machine: i386
>Description:
        useradd/usermod does not permit the use of the new MD5
	checksums when adding accounts.  Problem appears to also
	extend into the other user utilities due to common code.
>How-To-Repeat:

Example commands (note, passwords are munged for security, supply your own):
        usermod -s /bin/ksh -p '$1%mS2grPST$/xwNZFb6QENgP4fmzVkaB0' root
        useradd -u 100 -g staff -G wheel \
                -c "Douglas Wade Needham,,," \
                -p '$1$5IRDRAnb$DldpYJcjZcz39rQo52PAy0'
                cinnion
>Fix:
	Workaround is to manually set/change password with the
	password command.

        Fix will likely be to add code to usr.sbin/user/user.c to
	handle passwords of either 13 or 34 characters in length.
	However, exact fix is unavailable at this time (still setting
	up my 1.6 based build environment).

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: itojun 
State-Changed-When: Sun Sep 29 21:05:44 PDT 2002 
State-Changed-Why:  
-current fixed, pullup req sent to 1.6 

From: Jun-ichiro itojun Hagino <itojun@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/18474 CVS commit: basesrc/usr.sbin/user
Date: Mon, 30 Sep 2002 07:05:23 +0300 (EEST)

 Module Name:	basesrc
 Committed By:	itojun
 Date:		Mon Sep 30 04:05:23 UTC 2002

 Modified Files:
 	basesrc/usr.sbin/user: user.c

 Log Message:
 support MD5/blowfish password.  PR 18474.


 To generate a diff of this commit:
 cvs rdiff -r1.59 -r1.60 basesrc/usr.sbin/user/user.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


From: "Alistair G. Crooks" <agc@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/18474 CVS commit: basesrc/usr.sbin/user
Date: Mon, 30 Sep 2002 13:32:41 +0300 (EEST)

 Module Name:	basesrc
 Committed By:	agc
 Date:		Mon Sep 30 10:32:41 UTC 2002

 Modified Files:
 	basesrc/usr.sbin/user: user.c

 Log Message:
 Handle PR 18474 in a more safe and scalable fashion - keep a table of
 password types, and their associated lengths, and check in useradd or
 usermod whether the given encrypted password has the correct length.

 This removes the (duplicated) hardcoded lengths which had crept in
 with the last commit, and also checks the length of the given password
 against the expected length.


 To generate a diff of this commit:
 cvs rdiff -r1.60 -r1.61 basesrc/usr.sbin/user/user.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


From: Havard Eidnes <he@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/18474 CVS commit: [netbsd-1-6] basesrc/usr.sbin/user
Date: Sat,  7 Dec 2002 01:40:28 +0200 (EET)

 Module Name:	basesrc
 Committed By:	he
 Date:		Fri Dec  6 23:40:27 UTC 2002

 Modified Files:
 	basesrc/usr.sbin/user [netbsd-1-6]: user.c

 Log Message:
 Pull up revision 1.60 (via patch, requested by itojun in ticket #882):
   Support MD5 and blowfish password encryption.  Fixes
   PR#18474.


 To generate a diff of this commit:
 cvs rdiff -r1.51.2.1 -r1.51.2.2 basesrc/usr.sbin/user/user.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/18474 CVS commit: [netbsd-1-6] src/usr.sbin/user
Date: Thu, 26 Dec 2002 09:28:51 +0200 (EET)

 Module Name:	src
 Committed By:	tron
 Date:		Thu Dec 26 07:28:51 UTC 2002

 Modified Files:
 	src/usr.sbin/user [netbsd-1-6]: user.c

 Log Message:
 Pull up revision 1.61-1.62 (requested by he in ticket #1041):
 Handle PR 18474 in a more safe and scalable fashion - keep a table of
 password types, and their associated lengths, and check in useradd or
 usermod whether the given encrypted password has the correct length.
 This removes the (duplicated) hardcoded lengths which had crept in
 with the last commit, and also checks the length of the given password
 against the expected length.


 To generate a diff of this commit:
 cvs rdiff -r1.51.2.2 -r1.51.2.3 src/usr.sbin/user/user.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


From: Douglas Wade Needham <cinnion@ka8zrt.com>
To: gnats-bugs@netbsd.org
Cc:  
Subject: Re: bin/18474
Date: Mon, 5 May 2003 08:20:59 -0400

 The PR does not indicate what feedback is needed, and I suspect that
 it really should be closed.  This appears to be working great.  The
 only thing that could be improved is that the different password entry
 types now needs to be better documented.

 -- 
 Douglas Wade Needham - KA8ZRT        UN*X Consultant & UW/BSD kernel programmer
 Email:  cinnion @ ka8zrt . com       http://www.ka8zrt.com/~cinnion/
 Disclaimer: My opinions are my own.  Since I don't want them, why
             should my employer, or anybody else for that matter! 
State-Changed-From-To: feedback->closed 
State-Changed-By: fair 
State-Changed-When: Fri May 23 06:22:42 UTC 2003 
State-Changed-Why:  
submitter confirms that the problem is resolved. 

Please do submit a new problem report for the 
documentation issue you mentioned. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.