Operating System - HP-UX
1748219 Members
4495 Online
108759 Solutions
New Discussion юеВ

useradd/usermod and number of groups they accept

 
RICK RODIE
New Member

useradd/usermod and number of groups they accept

We just changed the kernel parm to allow a maximum of 256 groups per userid. The command "groups " would list all groups, even when the count exceeded 20. But the useradd or usermod -G refuses to accept more than just 20, whether listing the longer text names, or when command length is reduced with group numbers (so it is not ling length at work here). Is there a fix somewhere for this?
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: useradd/usermod and number of groups they accept

Shalom,

Far as I know there is a hard limit of 20 groups a single user can be a member of for 11.11 and 11.23.

I believe the limit may be changeable in 11.31.

root@dxp12nfs# kctune | grep group
ngroups_max 20 Default Immed


Please post the version of the OS you are using.

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
Viktor Balogh
Honored Contributor

Re: useradd/usermod and number of groups they accept

Rick,

Try the command as a shell script, so you can eliminate the shell's command-lenght limit. What is the output?
****
Unix operates with beer.
RICK RODIE
New Member

Re: useradd/usermod and number of groups they accept

We are running 11.31 already, and just added some maintenance. The new limit is now 256. Changed the kernel parm to work with it.

I initially tried the command from a script using group names in text form, and its cryptic error message led me to believe that the command line was too long; converted to group numbers. However, usermod now states specifically "Too many groups specified":

useradd -u 1600 -g 20 -G 114,120,864,117,804,112,182,104,200,170,115,121,1117,118,1119,110,181,105,134,135,1121,136,184,137,178,133,20,1109,116,122,1118,119,173,111,183,107,167 -s /bin/ksh -c "fake e user" fakeuser
Too many groups specified

# getconf NGROUPS_MAX
256

AFAIK, I am correctly entering the parms, but it is not working. What might I be missing?
Andrew Rutter
Honored Contributor

Re: useradd/usermod and number of groups they accept

hi,

what was the command you used to change the parareter? did you check the kclog afterwards for any indications?

what does the command kctune show it as now

#kctune ngroups_max

you shuldnt have needed to, but did you reboot afterwards? if changed with the -h option?

There was a patch to install for this feture as well, you obviously have this, or a later release of 11.31, but there are alot of patches that need to go along side of it as well, dont know if you have though about this side of things

see
ftp://g1u1297.austin.hp.com/hp-ux_patches/11.X/PHKL_38095.txt

All long shots from me, but just a few things I would start with, you may have already

Andy
RICK RODIE
New Member

Re: useradd/usermod and number of groups they accept

Changed it with ngroups_max=255
kctune shows ngroups_max 255 255 Immed
Yes, we did reboot as we were applying maintenance. This was the early 2011 patching, and we do it 2x a year. Been on 11.31 for awhile.
It will take awhile to sort through all the superceeded patches, but we *ought* to have all we need on there. Famous last words, of course. Will pursue the details next week.

Thanks.