1826460 Members
3074 Online
109692 Solutions
New Discussion

/usr/include/limits.h

 
George Doller
Frequent Advisor

/usr/include/limits.h

Is it possible to edit this file? and how?
I am trying to add a user to more then 20 groups in /etc/group and that user can not write to directories that are groups beyond number 20 in the group file. limits.h has a parameter called NGROUPS_MAX =20. Can I increase that or is there another way to accomplish this.
Thanks
6 REPLIES 6
S.K. Chan
Honored Contributor

Re: /usr/include/limits.h

I don't think you can change that limit because it's not a configurable kernel parameter. Furthermore changing it would need the kernel code to be recompiled. You just have to find a work-around for this limitation or find out if HP has a way to increase this limit. Maybe ACL is another way to solve this problem.
Tim Sanko
Trusted Contributor

Re: /usr/include/limits.h

First of all, This parameter is able to affect the building of the kernel. I would suggest not hacking it with vi or sed...

Second, If there are that many groups that you need IDs assigned to them ACLs would be a better way.

I can't imagine needing a user as part of that many groups, personnaly.

Tim
George Doller
Frequent Advisor

Re: /usr/include/limits.h

The reason for this is. I have numerous ftp accts for different departments and with my application (peoplesoft) all jobs use the same id, so I need for the peoplesoft if to be in all the ftp id group. To further complicate it, no ftp acct can see any others.
Did I explain it good enough?
doug hosking
Esteemed Contributor

Re: /usr/include/limits.h

George, changing this will not have the desired effect. NGROUPS_MAX is used by the kernel and various commands, such as su. You don't have source code for all of these, so you can't recompile them. Changing the value without recompiling them or only recompiling a small subset of them will not have the desired effect.

You might be able to use access control lists to solve your problem.
Tim Sanko
Trusted Contributor

Re: /usr/include/limits.h

You can have tons of people in one group here is a subset of my group file. There is no need for peoplesoft to be in all the groups of the system. we have hundreds of members in our visib group.
Tim Sanko
Trusted Contributor

Re: /usr/include/limits.h

You can have tons of people in one group here is a subset of my group file. There is no need for peoplesoft to be in all the groups of the system. we have hundreds of members in our visib group.