Bug 56225 - useradd ignores default group stored in /etc/default
useradd ignores default group stored in /etc/default
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils (Show other bugs)
7.2
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Peter Vrabec
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-13 22:32 EST by Need Real Name
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-21 09:22:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-11-13 22:32:24 EST
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 09:22:00 EDT
U need to use useradd -n.
-n option  cause useradd not to create new group for user, but use default group.
see man useradd

Note You need to log in before you can comment on or make changes to this bug.