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.
The manual pages
- Solnix: groupadd(8) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: groupadd(8) shadow-4.19.4
- FreeBSD: pw(8) 15.1-RELEASE (different command, similar job)
- OpenBSD: groupadd(8) 8.0
- NetBSD: groupadd(8) 11.0
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 with | Topic | What differs |
|---|---|---|
| Linux | system 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 meaning | On 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 verbose | OpenBSD 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 options | Linux 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 |
| Linux | group name rules | Solnix 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 four | exit status | Solnix 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 |
| FreeBSD | different command | FreeBSD 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, FreeBSD | members and password files | Linux -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 four | duplicate group handling | Solnix 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
| Task | Solnix | Linux | FreeBSD | OpenBSD | NetBSD |
|---|---|---|---|---|---|
| add a group | groupadd group | groupadd NEWGROUP | pw groupadd name | groupadd group | groupadd group |
| add a group with a given GID | groupadd -g gid group | groupadd -g GID NEWGROUP | pw groupadd name -g gid | groupadd -g gid group | groupadd -g gid group |
| allow a duplicate GID | groupadd -g gid -o group | groupadd -g GID -o NEWGROUP | pw groupadd name -g gid -o | groupadd -g gid -o group | groupadd -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 [
-ggid [-o]] group in portable scripts. On FreeBSD call pw groupadd instead, since it has no groupadd command. - Do not rely on
-ror-v:-rmeans different things on Linux and NetBSD and is absent on Solnix, and-vis 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.