Create user, group and edit group membership in macOS

Quick commands to create user and group in macOS with specific uid and gid, and to add a specific user to newly created group. Add group sudo dscl . -create /Groups/<name> gid <gid> Add user sudo dscl . -create /Users/<name> sudo dscl . -create /Users/<name> UniqueID “<uid>” sudo dscl . -create /Users/<name> PrimaryGroupID <gid> Add existing user to new group …

Read moreCreate user, group and edit group membership in macOS