Bug 15616

Summary: adduser shows uid '200' in use when the gid is in use
Product: Busybox Reporter: Sven Kirmess <sven.kirmess>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: minor CC: busybox-cvs, sven.kirmess
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Sven Kirmess 2023-06-02 08:34:22 UTC
adduser incorrectly reports the uid 200 to be already in use - the actual problem is that it tries to create a group with gid 200 and the gid is already in use.
The error message should read "adduser: gid '200' in use" or maybe even "adduser: gid '200' in use by group nofiles" to make it clear what the problem is.

$ docker run --rm -it alpine sh
/ # adduser -u 200 test
adduser: uid '200' in use
/ # grep 200 /etc/passwd /etc/group
/etc/group:nofiles:x:200:
/ # adduser -u 200 -G nofiles -D test


https://gitlab.alpinelinux.org/alpine/aports/-/issues/14954