Bug 16390

Summary: an issue with the user "root "
Product: Base System Reporter: kjh <kjh>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description kjh 2000-01-27 02:20:00 UTC
when a user has "root" as a user like "testroot" even though the user doesn't have user ID "0" and/or group ID "0" when that user creates a file the file has that user's name, but the group is the group with ID "0" (mostly "wheel").

fud% grep /etc/wheel
fud% grep wheel /etc/group
wheel:*:0:
fud# tail -1 /etc/passwd
testroot:*:1010:1009:testroot:/tmp:/usr/local/bin/zsh
fud# su - testroot
fud% id
uid=1010(testroot) gid=1009(leet) groups=1009(leet)
fud% pwd
/tmp
fud% ls -l
total 1
-rw-rw----  1 dante     wheel  6 Jan 26 04:27 test
-rw-r--r--  1 testroot  wheel  0 Jan 26 06:02 test3
fud% touch foo
fud% ls -l
total 1
-rw-r--r--  1 testroot  wheel  0 Jan 26 06:28 foo
-rw-rw----  1 dante     wheel  6 Jan 26 04:27 test
-rw-r--r--  1 testroot  wheel  0 Jan 26 06:02 test3

How-To-Repeat: create a user with the user "root" in it, like "testroot" give it a group ID other then "0" and create a file and see what group it created as.
Comment 1 jkh freebsd_committer freebsd_triage 2000-01-27 02:26:21 UTC
State Changed
From-To: open->closed

The stated behavior is correct.  The default group ID is inheirited from 
the parent directory.