免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1986 | 回复: 0
打印 上一主题 下一主题

如何更改用户所属group的个数up to 32 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-05 14:57 |只看该作者 |倒序浏览

DESCRIPTION:
By default according to the Solaris Administration Guide, Solaris OE supports 1 primary group and 16 supplementary groups. How do you increase the maximum number of groups to which a user can belong to more than 16?
SOLUTION:
The group database (NIS map or local /etc/group file) stores information about user groups, traditionally called UNIX groups. A user group is a collection of users who can share files and other system resources. For example, a set of users who are working on the same project might form a user group. Each group has a Group ID (GID), which identifies it internally to the system. A group should have a name and a list of user names.
Every user on a Solaris system belongs to at least 1 primary group and an absolute maximum of 32 secondary (supplementary) groups. By default, this supplementary group value (NGROUPS_MAX) is set at 16.
Solaris source code header file /usr/include/sys/param.h contains the following information.
/*
* These define the maximum and minimum allowable values of the
* configurable parameter NGROUPS_MAX.
*/
#define NGROUPS_UMIN    0
#define NGROUPS_UMAX    32
/*
* NGROUPS_MAX_DEFAULT: *MUST* match NGROUPS_MAX value in limits.h.
* Remember that the NFS protocol must rev. before this can be increased
*/
#define NGROUPS_MAX_DEFAULT     16

The NGROUPS_MAX value defaults to 16, and the absolute maximum is 32. The default value can be reset as follows:
  • Edit the /etc/system file and add the following line:
    set ngroups_max = 32
  • Reboot the system.
  • Verify that NGROUPS_MAX has been set to the correct value after rebooting using the getconf command.
    # getconf NGROUPS_MAX
    32
    Note: Do not raise the value of NGROUPS_MAX above 16 for systems that need to be NFS clients as this will break NFS authorization and those users will not be able to login because NFS internally depends on NGROUPS_MAX and is limited to only 16.
    Also, while booting up, the following message is displayed on the console:
    WARNING: ngroups_max of 32 > 16, NFS AUTH_SYS will not work properly


    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/26090/showart_291781.html
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP