1849082 Members
8699 Online
104041 Solutions
New Discussion

Re: useradd question

 
sparky_2
Frequent Advisor

useradd question

The default behaviour of the useradd command is to only add a userid to the /etc/group file in the case of secondary group membership, because the primary group information is stored in the passwd file. On one of our systems, however, userids are being added to their primary group field. Excessive redundant information, I think, and this will probably lead to group file corruption with continued growth. Anyone have any ideas about why this may be happening? Thanks.
6 REPLIES 6
hein coulier
Frequent Advisor

Re: useradd question

i think this is a default behavour of a linux system : each user gets a private group.
Steven E. Protter
Exalted Contributor

Re: useradd question

The OS has a hard limit on how many groups a user can be in, 20 for 11.11(11i).

I would look at any user add scripts you or your operations staff are rnning.

I'd also check the default user profile in /etc/skell

This is either being done by script, default profile or manual edit.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
sparky_2
Frequent Advisor

Re: useradd question

Thanks for your responses, but this actually occurs with a simple "useradd -g -m testuser". Further investigation has indicated that this is possibly a feature of the 10.20 OS...
Robert-Jan Goossens
Honored Contributor

Re: useradd question

You are completly right,

---

At 10.20, when adding users via the useradd(1M) command, an entry for
the user was added to /etc/group. When using useradd at 11.0,
this does not occur and /etc/group must be manually updated. This occurs
even with the latest useradd patch for 11.0.

---

Useradd does not add an entry to /etc/group at 11.0 DocId: KBRC00003218

http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063201097

Regards,
Robert-Jan
sparky_2
Frequent Advisor

Re: useradd question

Thanks for the verification Robert-Jan. I assume that manually removing the userids from the group file (there are multiple duplicate group entries) will not affect user accessibility?
Robert-Jan Goossens
Honored Contributor

Re: useradd question

Good question :-) i'm not shore !!

It has been a long time since I had to admin 10.20. I would suggest to test it with a few users before removing them all from the /etc/group file.

Kind regards,
Robert-Jan