usermod(8) on Solnix vs Linux and the BSDs

On Solnix, usermod is the illumos usermod at /usr/sbin/usermod. It also edits role, profile and authorization data (-A, -P, -R, -K), and -G replaces the supplementary group list. Linux needs -a to append to it. The Solnix page documents no password option and no account lock option.

What Solnix runs

A default Solnix system runs the illumos usermod at /usr/sbin/usermod. No other variants are shipped. The illumos page lists a 512-character line limit for the system file entries it writes. The BSD counterpart bundled here is NetBSD only; no FreeBSD or OpenBSD usermod page is in the bundle.

Differences

Compared withTopicWhat differs
Linux-G replaces the group listSolnix usermod -G redefines the user's supplementary groups. Linux does the same by default, and removes the user from unlisted groups. Linux adds -a to append instead. The Solnix page has no -a, so you must give the full list.
Source: Solnix usermod(8) -G; Linux usermod(8) -G, -a
NetBSD-G meaningSolnix -G takes a comma-separated list that redefines the supplementary groups, with no stated group maximum other than NGROUPS_UMAX. NetBSD -G adds the user to the listed groups in /etc/group, accepts a repeated option, and limits the list to 16 groups.
Source: Solnix usermod(8) -G; NetBSD usermod(8) -G
Linux, NetBSDsetting a passwordThe Solnix usermod page documents no option for setting a password. Linux has -p, taking an encrypted password, and NetBSD has -p, also taking an already-encrypted password.
Source: Solnix usermod(8) SYNOPSIS and OPTIONS; Linux usermod(8) -p; NetBSD usermod(8) -p
Linux, NetBSDlocking an accountThe Solnix page has no lock or unlock option. Linux has -L (lock) and -U (unlock). NetBSD has -C yes/no to lock or unlock the account. On Solnix, -e with a past date is the only documented way to stop logins, and it expires the login.
Source: Solnix usermod(8) -e; Linux usermod(8) -L, -U; NetBSD usermod(8) -C
Linux, NetBSD-e date formatSolnix -e takes a date in a format from /etc/datemsk (see getdate(3C)), and a blank value clears the expiry. Linux -e takes YYYY-MM-DD or days since 1970-01-01, and -1 or an empty string clears it. NetBSD -e takes month day year or epoch seconds, and 0 disables.
Source: Solnix usermod(8) -e; Linux usermod(8) -e; NetBSD usermod(8) -e
Linux, NetBSD-f inactive meaningSolnix -f is the maximum days between uses of a login before it is declared invalid; 0 defeats it. Linux -f is days after password expiry; 0 disables the account at expiry and -1 turns it off. NetBSD -f sets the time at which the password expires.
Source: Solnix usermod(8) -f; Linux usermod(8) -f; NetBSD usermod(8) -f
Linux, NetBSD-m home moveSolnix -m moves the home directory to the one given by -d. It also takes -z/-Z to control ZFS file systems: with MANAGE_ZFS=YES in /etc/default/useradd, the old ZFS file system is destroyed after the move. Linux and NetBSD have no -z or -Z for this.
Source: Solnix usermod(8) -m [-z|-Z]; Linux usermod(8) -m; NetBSD usermod(8) -m
Linux, NetBSDfile ownership after -uSolnix -u does not change the UID of the user's home directory files. The user loses access until you run chown(1). Linux -u changes ownership of the mailbox and files in the home directory automatically, but not files outside it.
Source: Solnix usermod(8) -u; Linux usermod(8) -u
Linux, NetBSDroles, profiles, authorizationsSolnix has -A (authorizations), -P (profiles), -R (roles) and -K key=value, which edit user_attr(5). With -K you can set type=role or type=normal. Linux and NetBSD have no equivalents. Linux -R means chroot directory and -P means prefix directory.
Source: Solnix usermod(8) -A, -P, -R, -K; Linux usermod(8) -R, -P
Linux-R and -P meaningOn Solnix, -R sets roles and -P sets execution profiles. On Linux, -R applies changes in a chroot directory and -P applies them in a prefix directory. A Linux script using -R or -P would misbehave on Solnix.
Source: Solnix usermod(8) -P, -R; Linux usermod(8) -R, -P
NetBSDdefaults file and extrasNetBSD reads defaults from /etc/usermgmt.conf, and has -F (force password change), -L (login class), -S, and -v (verbose). The Solnix page documents none of these and no usermgmt.conf-style file.
Source: NetBSD usermod(8) DESCRIPTION, -F, -L, -S, -v; Solnix usermod(8) SYNOPSIS
Linux, NetBSDexit statusSolnix usermod uses specific exit codes: 2 bad syntax, 3 bad argument, 4 UID in use, 6 login or group missing, 8 login in use, 9 new name in use, 10 cannot update /etc/group or /etc/user_attr, 11 and 12 home move failures. NetBSD documents only 0 and >0.
Source: Solnix usermod(8) EXIT STATUS; NetBSD usermod(8) EXIT STATUS

Standards

  • POSIX: usermod is not a POSIX.1-2024 utility.
  • Solnix: Interface Stability: Committed.

Writing portable scripts

  • Do not rely on -G, -R, -P, -p or -L across systems: they mean different things, or are missing, on Solnix, Linux and NetBSD. Branch on uname and write per-OS calls.
  • Use the exit status only as zero versus non-zero in portable scripts. Only Solnix documents specific codes.

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.