groupadd(8) on Solnix vs Linux and the BSDs

On Solnix, groupadd is the illumos groupadd at /usr/sbin/groupadd. It takes only -g and -o plus a group name. The Linux options -r, -f, -p, -K and -R, and the OpenBSD/NetBSD -v, are not in the Solnix page. FreeBSD has no groupadd command: use pw groupadd.

What Solnix runs

A default Solnix system runs the illumos groupadd at /usr/sbin/groupadd. No other variants are shipped. The command edits the local /etc/group file. It checks name and GID uniqueness against any network name service, but cannot change that service.

Differences

Compared withTopicWhat differs
Linuxsystem groups (-r)Linux groupadd -r creates a system group with a GID from the SYS_GID_MIN-SYS_GID_MAX range. Solnix has no -r. The Solnix default GID is the next number above the highest assigned, and GIDs 0-99 are reserved.
Source: Linux groupadd(8) -r; Solnix groupadd(8) -g
NetBSD-r meaningOn NetBSD, -r lowgid..highgid sets the GID range for new groups, when built with EXTENSIONS. On Linux, -r creates a system group and takes no argument. Solnix has no -r.
Source: NetBSD groupadd(8) -r; Linux groupadd(8) -r; Solnix groupadd(8) SYNOPSIS
OpenBSD, NetBSD-v verboseOpenBSD and NetBSD groupadd accept -v to explain the commands as they run (NetBSD: only if built with EXTENSIONS). The Solnix SYNOPSIS lists no -v, so a script using it fails on Solnix.
Source: OpenBSD groupadd(8) -v; NetBSD groupadd(8) -v; Solnix groupadd(8) SYNOPSIS
Linux-f, -p, -K, -R, -P, -U optionsLinux groupadd supports -f (exit 0 if the group exists), -p (initial password), -K (override login.defs values), -R (chroot), -P (prefix) and -U (member list). The Solnix page documents only -g and -o.
Source: Linux groupadd(8) -f, -p, -K, -R, -P, -U; Solnix groupadd(8) OPTIONS
Linuxgroup name rulesSolnix names use lower case letters and digits only, with a warning above MAXGLEN (usually eight characters). Linux allows upper case letters, underscores and dashes, up to 32 characters.
Source: Solnix groupadd(8) OPERANDS (group); Linux groupadd(8) DESCRIPTION
all fourexit statusSolnix groupadd uses distinct codes: 2 for bad syntax, 3 for an invalid option argument, 4 for a duplicate GID, 9 for a duplicate group name, 10 when /etc/group cannot be updated. OpenBSD and NetBSD document only 0 and >0.
Source: Solnix groupadd(8) EXIT STATUS; OpenBSD groupadd(8) EXIT STATUS; NetBSD groupadd(8) EXIT STATUS
FreeBSDdifferent commandFreeBSD has no groupadd in this bundle. The equivalent is pw groupadd name, which takes -g gid, -o, -M members, -N (dry run), -q and -C config. It logs to /var/log/userlog.
Source: FreeBSD pw(8) SYNOPSIS (groupadd), NOTES; Solnix groupadd(8) SYNOPSIS
Linux, FreeBSDmembers and password filesLinux -U and FreeBSD pw -M add members when the group is created. The Solnix groupadd takes no member list. The Solnix page says it only adds an entry to /etc/group.
Source: Linux groupadd(8) -U; FreeBSD pw(8) groupadd -M; Solnix groupadd(8) DESCRIPTION
all fourduplicate group handlingSolnix exits 9 if the group exists and 4 if the GID is not unique without -o. Only Linux -f documents exit-success-if-exists handling. The other pages do not document the duplicate-name case.
Source: Solnix groupadd(8) EXIT STATUS; Linux groupadd(8) -f; OpenBSD groupadd(8) EXIT STATUS

Everyday tasks

TaskSolnixLinuxFreeBSDOpenBSDNetBSD
add a groupgroupadd groupgroupadd NEWGROUPpw groupadd namegroupadd groupgroupadd group
add a group with a given GIDgroupadd -g gid groupgroupadd -g GID NEWGROUPpw groupadd name -g gidgroupadd -g gid groupgroupadd -g gid group
allow a duplicate GIDgroupadd -g gid -o groupgroupadd -g GID -o NEWGROUPpw groupadd name -g gid -ogroupadd -g gid -o groupgroupadd -g gid -o group
create a system group—groupadd -r NEWGROUP———

Standards

  • POSIX: groupadd is not a POSIX.1-2024 utility.

Writing portable scripts

  • Use only groupadd [-g gid [-o]] group in portable scripts. On FreeBSD call pw groupadd instead, since it has no groupadd command.
  • Do not rely on -r or -v: -r means different things on Linux and NetBSD and is absent on Solnix, and -v is absent on Solnix and Linux.

Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.