Operating System - HP-UX
1835238 Members
2388 Online
110078 Solutions
New Discussion

Re: possibly corrupt group file?

 
SOLVED
Go to solution
sparky_2
Frequent Advisor

possibly corrupt group file?

Hi,
We have a number of HP-UX systems with users that are secondary members of 2 additional groups. We have been experiencing warnings due to LINE MAX in limits.h being exceeded. I implemented a workaround for this by creating multiple entires for each group and dividing the users accordingly - ie,
mygroup::user1,user2,....
mygroup::user30,user31,....
But when I made any subsequent changes (eg adding a new user), the group file reverted back to its previous state!
I then decided to at least reduce the problem by making one of the secondary groups the primary for half the users, and the other the primary group for the other half. I used usermod -g for this, but the necessary group file updates have not been made - ie, the users are still listed under their now primary group. Even if I could edit the group file using vi (which I can't because of the corruption), the task of manual deletions would be far too tedious.
So basically, my question is:
does anyone know of a way to actually rebuild the /etc/group file?
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: possibly corrupt group file?

chkgrp

Will validate the file, though you seem to have already done that.

I would restore the group file to the way it was before you tried this change. That would be the easiest thing to do.

Then you can manually add additional groups wiht the groupadd command.

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
KapilRaj
Honored Contributor
Solution

Re: possibly corrupt group file?

Keep the group name diff but the GID same, in /etc/group file ... This would solve ur issue ...

sysad1::1245:kaps0,kaps1,kaps2.....
sysad2::1245:kaps50,kaps51,kaps52....

Kaps
Nothing is impossible
RAC_1
Honored Contributor

Re: possibly corrupt group file?

Check if there any problems with group file with grpck.

Also you can have different group name, but same gid.
This way you can have n no. of users with same gid.
There is no substitute to HARDWORK
Steven E. Protter
Exalted Contributor

Re: possibly corrupt group file?

forgive my disflexic fingers

grpck

Is what I meant earlier.

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: possibly corrupt group file?

Hmmm, afraid my problems aren't solved after all... I would still need to manually delete the users (1500+) from the group file and duplicate group ID warnings seem to be unavoidable... ;o(
Any more suggestions, or should I just quit while I'm (slightly) ahead?