NetBSD Problem Report #41049
From mike@helicon.int.bsdinsider.org Fri Mar 20 16:17:30 2009
Return-Path: <mike@helicon.int.bsdinsider.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 6600663B8EC
for <gnats-bugs@gnats.NetBSD.org>; Fri, 20 Mar 2009 16:17:30 +0000 (UTC)
Message-Id: <20090320032033.6DD4325A0E9@helicon.int.bsdinsider.org>
Date: Thu, 19 Mar 2009 23:20:33 -0400 (EDT)
From: mike@pelley.com
Reply-To: mike@pelley.com
To: gnats-bugs@gnats.NetBSD.org
Subject: usermod -g =uid testuser does not create group as indicated by man page
X-Send-Pr-Version: 3.95
>Number: 41049
>Category: bin
>Synopsis: usermod -g =uid testuser does not create group as indicated by man page
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 20 16:20:00 +0000 2009
>Closed-Date: Wed Nov 28 11:22:40 +0000 2012
>Last-Modified: Wed Nov 28 11:22:40 +0000 2012
>Originator: Mike Pelley
>Release: NetBSD 5.99.8
>Organization:
Foundation
>Environment:
System: NetBSD helicon.int.bsdinsider.org 5.99.8 NetBSD 5.99.8 (GENERIC) #0: Mon Mar 16 06:57:43 PDT 2009 builds@wb37:/home/builds/ab/HEAD/i386/200903160002Z-obj/home/builds/ab/HEAD/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
When usermod is called with '-g =uid', usermod should change the
user's group id to match the uid (which it does now), and it should
create a group with a gid that matches the uid of the user and a
name that matches the user name.
>How-To-Repeat:
/usr/sbin/useradd -u 10000 test
<test user added to /etc/passwd with gid 100>
/usr/sbin/usermod -g =uid test
<test user gid changed to 10000, but group not added to /etc/group>
Note: the usermod binary must be built from version 1.123 of user.c
or newer (i.e. March 20/09 or newer) or it will fail in a different
way.
>Fix:
Add group in the usermod or moduser functions in src/usr.sbin/user.c.
I may put together a patch shortly if no one smarter than me beats me
to it...
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: blymn@NetBSD.org
State-Changed-When: Wed, 28 Nov 2012 11:22:40 +0000
State-Changed-Why:
Patch supplied by google code in student.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.