Bug 56225

Summary: useradd ignores default group stored in /etc/default
Product: [Retired] Red Hat Linux Reporter: Need Real Name <trever>
Component: shadow-utilsAssignee: Peter Vrabec <pvrabec>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-21 13:22:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2001-11-14 03:32:24 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:
Although useradd -D -g X will successfully set the default group (and 
useradd -D displays it properly), useradd doesn't use the new default when 
creating new users.

This looks to be a re-introduction of whatever was the problem in bug ID 
26353 which affected RH 6.2.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Create a new group, by some means (ie creating a new user).
2./usr/sbin/useradd -D -g <name or gid of new group>
3./usr/sbin/useradd -D (to display the default settings)
4.Create a new user.  id -a the new user - it'll show that the user was 
not put into the new group - instead, a new group was created for the user.

This is contrary to the behavior of the command indicated within the 
manual pages.
	

Actual Results:  New user was created with wrong group.

Expected Results:  New user should have been created with group set to the 
new default group.

Additional info:

Comment 1 Peter Vrabec 2005-04-21 13:22:00 UTC
U need to use useradd -n.
-n option  cause useradd not to create new group for user, but use default group.
see man useradd