Date: Tue, 23 Nov 2021 05:02:15 +0000 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 Message-ID: <bug-238995-227-9wIf9D2bC5@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-238995-227@https.bugs.freebsd.org/bugzilla/> References: <bug-238995-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238995 Dennis Clarke <dclarke@blastwave.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|12.0-RELEASE |CURRENT --- Comment #1 from Dennis Clarke <dclarke@blastwave.org> --- 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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-238995-227-9wIf9D2bC5>