• Supplemental groups count in Linux

    From vallor@21:1/5 to All on Sun Dec 8 05:12:19 2024
    NGROUPS_MAX is the maximum supplemental group count for a Unix login.

    On Linux, it is 65536.

    But on MacOS and NetBSD, it is 16 -- which is the old standard.

    Even worse, MacOS has all but filled the supplemental groups with
    gid's for its own housekeeping:

    $ for II in `id -G -n`; do echo $II ; done
    staff
    everyone
    localaccounts
    _appserverusr
    admin
    _appserveradm
    _lpadmin
    _appstore
    _lpoperator
    _developer
    _analyticsusers
    com.apple.access_ftp
    com.apple.access_screensharing
    com.apple.access_ssh
    com.apple.access_remote_ae

    $ for II in `id -G -n`; do echo $II ; done | wc -l
    15

    What a waste of space! On Linux:

    $ for II in `id -G -n`; do echo $II ; done
    scott
    adm
    cdrom
    sudo
    dip
    plugdev
    lpadmin
    sambashare
    wireshark
    libvirt
    nordvpn

    $ for II in `id -G -n`; do echo $II ; done | wc -l
    11

    Conclusion: Linux is a modern OS, with much more administrative
    flexibility. Complex user-sharing configurations can be set
    up -- encompassing, if needed, thousands of supplemental
    groups.

    p.s. If someone could run this on Windows and report the value,
    I'd much appreciate it:

    - - %<- cut here - %<- - -
    #include <stdio.h>
    #include <limits.h>

    int main (void)
    {

    printf("%d\n",NGROUPS_MAX);

    return 0;
    }

    - - %<- cut here - %<- - -


    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.12.3 Release: Mint 21.3 Mem: 258G
    "If a program is useless, it must be documented."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to vallor on Sun Dec 8 06:55:25 2024
    On 8 Dec 2024 05:12:19 GMT, vallor wrote:

    Conclusion: Linux is a modern OS, with much more administrative
    flexibility. Complex user-sharing configurations can be set up -- encompassing, if needed, thousands of supplemental groups.

    Linux is the only real “industrial-strength” OS fit for the 21st century.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to ldo@nz.invalid on Sun Dec 8 07:31:59 2024
    On Sun, 8 Dec 2024 06:55:25 -0000 (UTC), Lawrence D'Oliveiro
    <ldo@nz.invalid> wrote in <vj3fss$3l3q8$5@dont-email.me>:

    On 8 Dec 2024 05:12:19 GMT, vallor wrote:

    Conclusion: Linux is a modern OS, with much more administrative
    flexibility. Complex user-sharing configurations can be set up --
    encompassing, if needed, thousands of supplemental groups.

    Linux is the only real “industrial-strength” OS fit for the 21st
    century.

    Well, when it comes to supplemental groups, I'm not so sure...I suspect
    it might be a 32-bit field on Windows, but I don't have a Windows
    machine to check that on.

    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.12.3 Release: Mint 21.3 Mem: 258G
    "He's dead, Jim. Get his ears! - Spock"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DFS@21:1/5 to vallor on Sun Dec 8 19:23:50 2024
    On 12/8/2024 12:12 AM, vallor wrote:
    NGROUPS_MAX is the maximum supplemental group count for a Unix login.

    On Linux, it is 65536.

    But on MacOS and NetBSD, it is 16 -- which is the old standard.

    Even worse, MacOS has all but filled the supplemental groups with
    gid's for its own housekeeping:

    $ for II in `id -G -n`; do echo $II ; done
    staff
    everyone
    localaccounts
    _appserverusr
    admin
    _appserveradm
    _lpadmin
    _appstore
    _lpoperator
    _developer
    _analyticsusers
    com.apple.access_ftp
    com.apple.access_screensharing
    com.apple.access_ssh
    com.apple.access_remote_ae

    $ for II in `id -G -n`; do echo $II ; done | wc -l
    15

    What a waste of space! On Linux:

    $ for II in `id -G -n`; do echo $II ; done
    scott
    adm
    cdrom
    sudo
    dip
    plugdev
    lpadmin
    sambashare
    wireshark
    libvirt
    nordvpn

    $ for II in `id -G -n`; do echo $II ; done | wc -l
    11

    Conclusion: Linux is a modern OS, with much more administrative
    flexibility. Complex user-sharing configurations can be set
    up -- encompassing, if needed, thousands of supplemental
    groups.

    p.s. If someone could run this on Windows and report the value,
    I'd much appreciate it:

    - - %<- cut here - %<- - -
    #include <stdio.h>
    #include <limits.h>

    int main (void)
    {

    printf("%d\n",NGROUPS_MAX);

    return 0;
    }

    - - %<- cut here - %<- - -


    D:\temp>tcc ngroups.c -o ngroups.exe
    ngroups.c:6: error: 'NGROUPS_MAX' undeclared

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to All on Mon Dec 9 04:06:37 2024
    On Sun, 8 Dec 2024 19:23:50 -0500, DFS <guhnoo-basher@linux.advocaca>
    wrote in <vj5daf$30up$2@dont-email.me>:

    On 12/8/2024 12:12 AM, vallor wrote:
    NGROUPS_MAX is the maximum supplemental group count for a Unix login.

    On Linux, it is 65536.

    But on MacOS and NetBSD, it is 16 -- which is the old standard.

    Even worse, MacOS has all but filled the supplemental groups with
    gid's for its own housekeeping:

    $ for II in `id -G -n`; do echo $II ; done
    staff
    everyone
    localaccounts
    _appserverusr
    admin
    _appserveradm
    _lpadmin
    _appstore
    _lpoperator
    _developer
    _analyticsusers
    com.apple.access_ftp
    com.apple.access_screensharing
    com.apple.access_ssh
    com.apple.access_remote_ae

    $ for II in `id -G -n`; do echo $II ; done | wc -l
    15

    What a waste of space! On Linux:

    $ for II in `id -G -n`; do echo $II ; done
    scott
    adm
    cdrom
    sudo
    dip
    plugdev
    lpadmin
    sambashare
    wireshark
    libvirt
    nordvpn

    $ for II in `id -G -n`; do echo $II ; done | wc -l
    11

    Conclusion: Linux is a modern OS, with much more administrative
    flexibility. Complex user-sharing configurations can be set
    up -- encompassing, if needed, thousands of supplemental
    groups.

    p.s. If someone could run this on Windows and report the value,
    I'd much appreciate it:

    - - %<- cut here - %<- - -
    #include <stdio.h>
    #include <limits.h>

    int main (void)
    {

    printf("%d\n",NGROUPS_MAX);

    return 0;
    }

    - - %<- cut here - %<- - -


    D:\temp>tcc ngroups.c -o ngroups.exe
    ngroups.c:6: error: 'NGROUPS_MAX' undeclared

    No POSIX for you.

    Seriously, though, try this:

    #define _POSIX_
    #include <stdio.h>
    #include <limits.h>

    int main (void)
    {

    printf("%d\n",NGROUPS_MAX);

    return 0;
    }

    I know the answer though, because I downloaded tcc and looked
    in limits.h -- which you could have done. (But I don't think
    the value in there properly reflects the system value -- couldn't
    find a prototype for getgroups(3).)

    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.12.3 Release: Mint 21.3 Mem: 258G
    "Windows: just another pane in the glass."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to vallor on Mon Dec 9 03:45:11 2024
    On 8 Dec 2024 07:31:59 GMT, vallor wrote:

    ... I don't have a Windows machine to check that on.

    I don’t any of the Windows fan(atic)s here even have the nous to
    understand the question.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to ldo@nz.invalid on Mon Dec 9 04:43:16 2024
    On Mon, 9 Dec 2024 03:45:11 -0000 (UTC), Lawrence D'Oliveiro
    <ldo@nz.invalid> wrote in <vj5p46$8isq$3@dont-email.me>:

    On 8 Dec 2024 07:31:59 GMT, vallor wrote:

    ... I don't have a Windows machine to check that on.

    I don’t any of the Windows fan(atic)s here even have the nous to
    understand the question.

    DFS almost had the answer, if he'd just looked in limits.h.

    BTW, tcc is smarter on Linux:

    $ tcc -o try_ngroups_max_tcc try_ngroups_max.c
    $ ./try_ngroups_max_tcc
    65536

    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.12.3 Release: Mint 21.3 Mem: 258G
    "Do radioactive cats have 18 half-lives?"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DFS@21:1/5 to vallor on Mon Dec 9 13:19:28 2024
    On 12/8/2024 11:06 PM, vallor wrote:
    On Sun, 8 Dec 2024 19:23:50 -0500, DFS <guhnoo-basher@linux.advocaca>
    wrote in <vj5daf$30up$2@dont-email.me>:

    On 12/8/2024 12:12 AM, vallor wrote:
    NGROUPS_MAX is the maximum supplemental group count for a Unix login.

    On Linux, it is 65536.

    But on MacOS and NetBSD, it is 16 -- which is the old standard.

    Even worse, MacOS has all but filled the supplemental groups with
    gid's for its own housekeeping:

    $ for II in `id -G -n`; do echo $II ; done
    staff
    everyone
    localaccounts
    _appserverusr
    admin
    _appserveradm
    _lpadmin
    _appstore
    _lpoperator
    _developer
    _analyticsusers
    com.apple.access_ftp
    com.apple.access_screensharing
    com.apple.access_ssh
    com.apple.access_remote_ae

    $ for II in `id -G -n`; do echo $II ; done | wc -l
    15

    What a waste of space! On Linux:

    $ for II in `id -G -n`; do echo $II ; done
    scott
    adm
    cdrom
    sudo
    dip
    plugdev
    lpadmin
    sambashare
    wireshark
    libvirt
    nordvpn

    $ for II in `id -G -n`; do echo $II ; done | wc -l
    11

    Conclusion: Linux is a modern OS, with much more administrative
    flexibility. Complex user-sharing configurations can be set
    up -- encompassing, if needed, thousands of supplemental
    groups.

    p.s. If someone could run this on Windows and report the value,
    I'd much appreciate it:

    - - %<- cut here - %<- - -
    #include <stdio.h>
    #include <limits.h>

    int main (void)
    {

    printf("%d\n",NGROUPS_MAX);

    return 0;
    }

    - - %<- cut here - %<- - -


    D:\temp>tcc ngroups.c -o ngroups.exe
    ngroups.c:6: error: 'NGROUPS_MAX' undeclared

    No POSIX for you.

    Seriously, though, try this:

    #define _POSIX_
    #include <stdio.h>
    #include <limits.h>

    int main (void)
    {

    printf("%d\n",NGROUPS_MAX);

    return 0;
    }


    $ tcc ngroups.c -o ngroups.exe
    In file included from ngroups.c:3: d:/computer/apps/compilers/tcc/tcc-0.9.27/include/limits.h:105: warning: PATH_MAX redefined

    $ ngroups
    16

    Obviously 16 isn't the max number of user groups you can create on
    Windows. I can't find a max value online. I did find that a user can
    be a member of a maximum of ~1015 groups.



    I know the answer though, because I downloaded tcc and looked
    in limits.h -- which you could have done.

    I was going to... but my balls started itching and I had to take care of
    that.



    (But I don't think
    the value in there properly reflects the system value -- couldn't
    find a prototype for getgroups(3).)

    Linux:
    $ sudo groupadd demo
    $ sudo groupdel demo

    Windows:
    $ sudo net localgroup demo /add
    $ sudo net localgroup demo /delete


    To show groups:
    $ net localgroup

    Aliases for \\DFS-WIN11PRO ------------------------------------------------------------------------------- *Access Control Assistance Operators
    *Administrators
    *Backup Operators
    *Cryptographic Operators
    *Device Owners
    *Distributed COM Users
    *Event Log Readers
    *Guests
    *Hyper-V Administrators
    *IIS_IUSRS
    *Network Configuration Operators
    *OpenSSH Users
    *Performance Log Users
    *Performance Monitor Users
    *Power Users
    *Remote Desktop Users
    *Remote Management Users
    *Replicator
    *System Managed Accounts Group
    *User Mode Hardware Operators
    *Users


    That's 21 groups that were created automatically during install and configuration (I didn't manually create any of them).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)