Date: Sun, 9 Apr 2000 03:22:09 -0700 (PDT) From: pius@zyan.com To: freebsd-gnats-submit@FreeBSD.org Subject: bin/17877: Cannot change login group with "pw usermod -g" (on FreeBSD 4.0 only) Message-ID: <200004091022.DAA36316@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 17877
>Category: bin
>Synopsis: Cannot change login group with "pw usermod -g" (on FreeBSD 4.0 only)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Apr 9 03:30:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Pius Fischer
>Release: 4.0-20000208-CURRENT
>Organization:
Zyan Communications
>Environment:
FreeBSD axilla2.zyan.com 4.0-20000208-CURRENT FreeBSD 4.0-20000208-CURRENT #0: Fri Feb 18 14:54:38 PST 2000 pius@axilla2.zyan.com:/usr/src/sys/compile/AXILLA2 i386
>Description:
Due to the changes made in revision 1.33 of pw_user.c,
"pw usermod <user> -g <group>" can no longer be used to change
a user's login group.
>How-To-Repeat:
On a FreeBSD 4.0 system, try to use "pw usermod <user> -g <group>"
to change the login group of a user.
>Fix:
A simple patch:
=cut=
--- usr.sbin/pw/pw_user.c.orig Fri Jan 14 16:20:21 2000
+++ usr.sbin/pw/pw_user.c Sat Apr 8 23:41:26 2000
@@ -468,7 +468,7 @@
gid_t newgid = (gid_t) GETGRNAM(cnf->default_group)->gr_gid;
if (newgid != pwd->pw_gid) {
edited = 1;
- pwd->pw_gid = pwd->pw_gid;
+ pwd->pw_gid = newgid;
}
}
=cut=
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004091022.DAA36316>
