NetBSD Problem Report #15791
Received: (qmail 3692 invoked from network); 3 Mar 2002 12:58:58 -0000
Message-Id: <200203031358.g23Dwnf01008@localhost.nissenrinne.fi>
Date: Sun, 3 Mar 2002 13:58:49 GMT
From: martti.kuparinen@iki.fi
Reply-To: martti.kuparinen@iki.fi
To: gnats-bugs@gnats.netbsd.org
Subject: useradd -r doesn't work correctly
X-Send-Pr-Version: 3.95
>Number: 15791
>Category: bin
>Synopsis: useradd -r doesn't work correctly
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Mar 03 12:59:00 +0000 2002
>Closed-Date: Tue Feb 22 06:33:08 +0000 2005
>Last-Modified: Wed May 13 13:28:01 +0000 2015
>Originator: Martti Kuparinen
>Release: NetBSD 1.5ZA
>Organization:
>Environment:
System: NetBSD localhost 1.5ZA NetBSD 1.5ZA (OMNIBOOK) #51: Fri Mar 1 06:59:17 UTC 2002 root@localhost:/work/netbsd/src/sys/arch/i386/compile/OMNIBOOK i386
Architecture: i386
Machine: i386
>Description:
There's something wrong in useradd's -r flag in netbsd-1-5. On -current
everything works okay:
ROOT localhost:~> uname -r
1.5ZA
ROOT localhost:~> useradd -m -r2000..2009 foo
ROOT localhost:~> id foo
uid=2000(foo) gid=100(users) groups=100(users)
As seen from the output, the user got an uid from the given range.
The same command on 1.5.x doesn't work, i.e. the user's uid is not
from the specified range:
ROOT fw:~> uname -r
1.5.3_ALPHA
ROOT fw:~> useradd -m -r2000..2009 foo
ROOT fw:~> id foo
uid=1001(foo) gid=100(users) groups=100(users)
I have not modified /etc/usermgmt.conf in any way...
>How-To-Repeat:
>Fix:
Unknown.
>Release-Note:
>Audit-Trail:
From: Alistair Crooks <agc@pkgsrc.org>
To: martti.kuparinen@iki.fi
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: bin/15791: useradd -r doesn't work correctly
Date: Mon, 4 Mar 2002 14:19:37 +0100
> There's something wrong in useradd's -r flag in netbsd-1-5. On -current
> everything works okay:
>
> ROOT localhost:~> uname -r
> 1.5ZA
> ROOT localhost:~> useradd -m -r2000..2009 foo
> ROOT localhost:~> id foo
> uid=2000(foo) gid=100(users) groups=100(users)
>
> As seen from the output, the user got an uid from the given range.
> The same command on 1.5.x doesn't work, i.e. the user's uid is not
> from the specified range:
>
> ROOT fw:~> uname -r
> 1.5.3_ALPHA
> ROOT fw:~> useradd -m -r2000..2009 foo
> ROOT fw:~> id foo
> uid=1001(foo) gid=100(users) groups=100(users)
>
> I have not modified /etc/usermgmt.conf in any way...
>
It was fixed in 1.46 of usr.sbin/user/user.c
----------------------------
revision 1.46
date: 2002/02/05 19:18:29; author: agc; state: Exp; lines: +4 -3
Search uid ranges properly, using command line ranges if provided, and
using the default range last.
Problem reported by Cillian Sharkey <cns@redbrick.dcu.ie>
----------------------------
but I haven't requested a pullup yet.
Regards,
Alistair
From: Martti Kuparinen <martti.kuparinen@iki.fi>
To: Alistair Crooks <agc@pkgsrc.org>
Cc: martti.kuparinen@iki.fi, <gnats-bugs@gnats.netbsd.org>
Subject: Re: bin/15791: useradd -r doesn't work correctly
Date: Mon, 4 Mar 2002 16:02:15 +0200 (EET)
On Mon, 4 Mar 2002, Alistair Crooks wrote:
> but I haven't requested a pullup yet.
I have, few hours ago...
Martti
State-Changed-From-To: open->closed
State-Changed-By: martti@netbsd.org
State-Changed-When: Tue, 22 Feb 2005 06:33:08 +0000
State-Changed-Why:
No longer an issue
>Unformatted:
(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.