login(1) on Solnix vs Linux and the BSDs
On Solnix, login is the illumos /usr/bin/login. It authenticates through PAM and has -d, -R, -s, -t, -u and -U options that the other systems do not. The bundle documents no -f (preauthenticated login), which Linux, FreeBSD, OpenBSD and NetBSD all have.
The manual pages
What Solnix runs
A default Solnix system runs the illumos login at /usr/bin/login. No other variants are shipped. The ksh, ksh93 and csh shells have their own login built-ins; see ksh(1), ksh93(1) and csh(1).
Differences
| Compared with | Topic | What differs |
|---|---|---|
| all four | -f (skip authentication) | The Solnix SYNOPSIS and OPTIONS in the bundle document no -f. Linux, FreeBSD, OpenBSD and NetBSD all provide -f for an already-authenticated user. A script that calls login -f user should not be assumed to work on Solnix.Source: Solnix login(1) SYNOPSIS and OPTIONS; Linux login(1) -f; FreeBSD login(1) -f; OpenBSD login(1) -f; NetBSD login(1) -f |
| FreeBSD, OpenBSD, NetBSD | environment handling and -p | On the BSDs, login discards the previous environment by default and -p keeps it. On Solnix, the environment is built from a fixed basic set (HOME, LOGNAME, PATH, SHELL, MAIL, TZ), and -p passes the current variables on. Even with -p, PATH and SHELL cannot be changed.Source: Solnix login(1) DESCRIPTION (basic environment, -p); FreeBSD login(1) -p; OpenBSD login(1) -p; NetBSD login(1) -p |
| Linux | extra arguments become Ln= variables | Solnix puts a login argument without = into the environment as Ln=xxx, counting from L0. Arguments with = are set as given, except PATH and SHELL, which are refused. The Linux synopsis shows [ENV=VAR...], and the page does not describe an Ln= scheme. Source: Solnix login(1) DESCRIPTION (Ln=xxx); Linux login(1) SYNOPSIS |
| OpenBSD | -R meaning | Solnix -R repository names the PAM repository used with the -u identity. OpenBSD -R remote-addr gives the remote socket address, which is passed to login.conf classify scripts.Source: Solnix login(1) -R; OpenBSD login(1) -R |
| OpenBSD | -u meaning | Solnix -u identity is the identity string (for Kerberos, the principal name) used by PAM. OpenBSD -u username is the remote user who started the connection, usable only by the superuser, and it sets REMOTEUSER.Source: Solnix login(1) -u; OpenBSD login(1) -u, ENVIRONMENT |
| NetBSD | -s meaning | Solnix -s service selects the PAM service name, for example ktelnet. NetBSD -s requires a secure authentication mechanism such as Kerberos or S/Key, and is not supported under pam(8).Source: Solnix login(1) -s; NetBSD login(1) -s |
| FreeBSD, OpenBSD, NetBSD | -r (rlogin) | Solnix and Linux have -r hostname, used by in.rlogind on Solnix. The FreeBSD, OpenBSD and NetBSD synopses have no -r. Solnix also has -U ruser for Kerberized rlogin.Source: Solnix login(1) -r, -U; Linux login(1) SYNOPSIS; FreeBSD/OpenBSD/NetBSD login(1) SYNOPSIS |
| all four | -h with a terminal argument | Solnix -h takes hostname and an optional terminal type, which must not start with a hyphen. It is used by in.telnetd. The other four systems document -h with a host only. The BSD pages say it is superuser-only, and Linux says -h is only used by root.Source: Solnix login(1) -h; Linux login(1) OPTIONS; FreeBSD login(1) -h; OpenBSD login(1) -h; NetBSD login(1) -h |
| all four | -d device | Solnix -d device gives the TTY path so login need not call ttyname(3C). It works only when UID and effective UID are root, and otherwise login quietly exits. None of the counterpart pages has -d.Source: Solnix login(1) -d; Linux/FreeBSD/OpenBSD/NetBSD login(1) SYNOPSIS |
| FreeBSD, OpenBSD, NetBSD | access control and device files | Solnix sets device permissions from /etc/logindevperm. Root remote login is allowed by commenting out CONSOLE=/dev/console in /etc/default/login. FreeBSD and OpenBSD use /etc/fbtab, and FreeBSD adds login.access(5) and login.conf(5). OpenBSD and NetBSD show /etc/nologin.Source: Solnix login(1) DESCRIPTION (logindevperm, /etc/default/login); FreeBSD login(1); OpenBSD login(1); NetBSD login(1) |
| OpenBSD | failed-login logging | On Solnix, five incorrect attempts may be logged in /var/adm/loginlog if that file exists, and the TTY line is dropped. OpenBSD records failures in /var/log/failedlogin if it exists. Linux, FreeBSD and NetBSD say nothing comparable.Source: Solnix login(1) DESCRIPTION; OpenBSD login(1) |
| OpenBSD | non-root invocation | Solnix login, like Linux, is meant to be run as exec login to replace the initial shell. OpenBSD says that when a non-root user runs login, it executes su(1) in login emulation mode instead. The Solnix text does not describe this. Source: Solnix login(1) DESCRIPTION; OpenBSD login(1) DESCRIPTION |
| FreeBSD, OpenBSD, NetBSD | environment variables set | The Solnix page lists HOME, LOGNAME, PATH=/usr/bin:, SHELL, MAIL=/var/mail/ and TZ. It does not list TERM or USER, which the three BSD pages say login sets. OpenBSD also sets REMOTEHOST and REMOTEUSER.Source: Solnix login(1) DESCRIPTION; FreeBSD/OpenBSD/NetBSD login(1) DESCRIPTION; OpenBSD login(1) ENVIRONMENT |
Standards
- POSIX: login is not a POSIX.1-2024 utility.
Writing portable scripts
- Do not rely on
-f,-r,-R,-sor-uin portable scripts: their meaning differs or they are missing.-pand-hare the only options common to all five systems. - Call login only as exec login from a login shell, never as a sub-process. Linux and Solnix both say it must replace the shell.
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.