Create hidden users group from terminal

Hi,

I need to create a new users group on macos (version 10.15 and up) from terminal or from swift. The group must be "hidden", not be displayed into System Preferences, similar to www group for example.

I've found 2 ways to create a group from terminal: dscl and dseditgroup, but in both cases the created group is visible into the Users and Groups list from System Settings.

Any suggestions how I can hide the group?

Thanks

Answered by smaryus in 751555022

Creating an users group with the ID smaller then 500, it will not be displayed into the System Settings list.

Accepted Answer

Creating an users group with the ID smaller then 500, it will not be displayed into the System Settings list.

Create hidden users group from terminal
 
 
Q