From nobody Tue Nov 23 05:02:15 2021 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2EE8B18AA99F for ; Tue, 23 Nov 2021 05:02:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HysSl0frKz4cp8 for ; Tue, 23 Nov 2021 05:02:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECCBE109A8 for ; Tue, 23 Nov 2021 05:02:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1AN52EAx005317 for ; Tue, 23 Nov 2021 05:02:14 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1AN52Ew7005316 for bugs@FreeBSD.org; Tue, 23 Nov 2021 05:02:14 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 238995] adduser does not check for pre-existing user field entries in /etc/group Date: Tue, 23 Nov 2021 05:02:15 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: dclarke@blastwave.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: version Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238995 Dennis Clarke changed: What |Removed |Added ---------------------------------------------------------------------------- Version|12.0-RELEASE |CURRENT --- Comment #1 from Dennis Clarke --- Here we are at the end of 2021 and heading into 2022 and we still have this situation :=20 We have the following group in /etc/group :=20 aarch64:*:31415:aarch64 We then create the user aarch64 with the slightly borked adduser :=20 europa# adduser=20 Username: aarch64 Full name: ARM64 QEMU Uid (Leave empty for default): 31415 Login group [aarch64]:=20 Login group is aarch64. Invite aarch64 into other groups? []: devl Login class [default]:=20 Shell (sh csh tcsh git-shell bash rbash nologin) [sh]:=20 Home directory [/home/aarch64]:=20 Home directory permissions (Leave empty for default):=20 Use password-based authentication? [yes]:=20 Use an empty password? (yes/no) [no]:=20 Use a random password? (yes/no) [no]:=20 Enter password:=20 Enter password again:=20 Lock out the account after creation? [no]:=20 Username : aarch64 Password : ***** Full Name : ARM64 QEMU Uid : 31415 Class :=20 Groups : aarch64 devl Home : /home/aarch64 Home Mode :=20 Shell : /bin/sh Locked : no OK? (yes/no): yes adduser: INFO: Successfully added (aarch64) to the user database. Add another user? (yes/no): no Goodbye! europa#=20 Sure enough the "adduser" creates yet another group with the exact same name but a separate gid :=20 europa# grep 'aarch' /etc/group devl:*:20002:dclarke,riscv,aarch64 aarch64:*:31415:aarch64 aarch64:*:31416: europa#=20 This is just plain blunt trauma wrong. So now I need to go manually fix this mess and change the gid ownership in the new user home directory. --=20 Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken GreyBeard and suspenders optional --=20 You are receiving this mail because: You are the assignee for the bug.=