NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/41049: usermod -g =uid testuser does not create group as indicated by man page



>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:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 20 16:20:00 +0000 2009
>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...

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index