groupmod(8) on Solnix vs Linux and the BSDs
On Solnix, groupmod is the illumos groupmod at /usr/sbin/groupmod. It edits /etc/group and takes only -g, -n and -o, so the Linux options -a, -U, -p, -R and -P and the BSD -v are not available. It has detailed exit codes (2, 3, 4, 6, 9, 10), unlike the BSDs, which document only >0.
The manual pages
- Solnix: groupmod(8) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: groupmod(8) shadow-4.19.4
- OpenBSD: groupmod(8) 8.0
- NetBSD: groupmod(8) 11.0
What Solnix runs
A default Solnix system runs the illumos groupmod at /usr/sbin/groupmod. No other variants are shipped. The page is published in pkgs.solnix.illumos-world-man.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | member list options | Linux groupmod has -U to set members and -a to append them. The Solnix synopsis has neither, so group membership cannot be changed with groupmod on Solnix. The page points to usermod(8) and related pages but does not say how to change members.Source: Linux groupmod(8) -U, -a; Solnix groupmod(8) SYNOPSIS, OPTIONS |
| Linux | password option | Linux groupmod -p sets the group's encrypted password. Solnix groupmod has no -p option.Source: Linux groupmod(8) -p, --password; Solnix groupmod(8) SYNOPSIS |
| Linux | -R and -P directory options | Linux groupmod has -R (chroot directory) and -P (prefix directory) to edit another tree's files. Solnix groupmod has neither and the page names only /etc/group.Source: Linux groupmod(8) -R, --root, -P, --prefix; Solnix groupmod(8) DESCRIPTION |
| OpenBSD, NetBSD | -v verbose flag | OpenBSD and NetBSD groupmod accept -v to explain commands as they run. NetBSD says -v exists only if built with EXTENSIONS. Solnix groupmod has no -v, so a script passing it will fail.Source: OpenBSD groupmod(8) -v; NetBSD groupmod(8) -v; Solnix groupmod(8) SYNOPSIS |
| Linux, OpenBSD, NetBSD | -g gid range and default | Solnix requires the gid to be a non-negative decimal integer below MAXUID and says it defaults to the next free number above 99, with 0-99 reserved. Linux says only non-negative and does no GID_MIN/GID_MAX checks. The BSD pages state no range. Source: Solnix groupmod(8) -g; Linux groupmod(8) -g; OpenBSD groupmod(8) -g; NetBSD groupmod(8) -g |
| Linux | effect of -g on users and files | Linux says users with the group as primary group are updated, and files with the old GID must be changed by hand. The Solnix page says neither; it describes only editing /etc/group.Source: Linux groupmod(8) -g; Solnix groupmod(8) DESCRIPTION, NOTES |
| Linux, OpenBSD, NetBSD | group name limits | Solnix -n expects at most eight bytes of lower-case letters and digits, and only warns if the name does not fit; a future release may refuse it. No colon or newline is allowed. The other pages state no such limit.Source: Solnix groupmod(8) -n; Linux groupmod(8) -n; OpenBSD groupmod(8) -n; NetBSD groupmod(8) -n |
| Linux, OpenBSD, NetBSD | exit status | Solnix groupmod documents exit codes: 2 bad syntax, 3 bad option argument, 4 gid not unique, 6 group missing, 9 new name already exists, 10 cannot update /etc/group. OpenBSD and NetBSD document only 0 on success and >0 on error. The Linux page in the bundle has no exit status section.Source: Solnix groupmod(8) EXIT STATUS; OpenBSD groupmod(8) EXIT STATUS; NetBSD groupmod(8) EXIT STATUS |
| Linux, OpenBSD, NetBSD | name services and line length | Solnix groupmod changes only /etc/group. It cannot change entries from a network name service, though it checks name and gid uniqueness against it. It fails if a group line exceeds 2047 characters. The other pages do not say this.Source: Solnix groupmod(8) NOTES; Linux groupmod(8) DESCRIPTION; OpenBSD groupmod(8) DESCRIPTION |
| Linux | -o without -g | Linux says -o applies when used with -g. Solnix lists -o only inside the -g group in the synopsis ([-g gid [-o]]), so -o without -g is not valid there. The BSD synopses list -o separately.Source: Solnix groupmod(8) SYNOPSIS; Linux groupmod(8) -o; OpenBSD groupmod(8) SYNOPSIS; NetBSD groupmod(8) SYNOPSIS |
Standards
- POSIX: groupmod is not a POSIX.1-2024 utility.
Writing portable scripts
- Use only
-g,-nand-owith a single group operand. That subset is accepted on Solnix, Linux, OpenBSD and NetBSD. - Do not rely on specific non-zero exit codes. Only Solnix documents them; the BSD pages say only >0.
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.