Sortix
Sortix Download Manual Development Source Code News Blog More
current nightly

Sortix nightly manual

This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.

LOGIN(8) System Manager's Manual LOGIN(8)

NAME

login — authenticate users and run personal session

SYNOPSIS

login

DESCRIPTION

login interactively authenticates users by asking them to enter their username and password. The passwords are checked against the password hashes in /etc/passwd as described in passwd(5). login creates a session as the requested user upon successful authentication.

login has a graphical interface if the display is graphical and uses a textual interface otherwise. The textual interface is forced if /etc/login.conf.textual exists. The process remains running in the background and takes over again when the user session exits.

The user's session(5) is created upon login by running the user's ~/.session script if it exists and is executable, otherwise attempting /etc/session, and ultimately falling back on the user's shell from passwd(5). It can be overriden by suffixing the username with a colon and the name of the program to launch. If the program name is skipped, the login shell is launched.

Type a special username to perform special options:

exit
alias for poweroff
poweroff
exit asking for powering off the computer
reboot
exit asking for rebooting the computer
halt
exit asking for halting the computer
reinit
exit asking for reinitializing the system

SECURITY

There is currently no method to confirm the login screen is in fact real other than witnessing a pristine boot. Local users can log in and show a counterfeit login screen that look and behave like the real login program and trick the next user into revealing their password.

ENVIRONMENT

login sets the following environment variables to match the authenticated user:

HOME
home directory
LOGNAME
username
SHELL
shell
USER
username

FILES

~/.session
user session script run upon login (see session(5))
/etc/login.conf.textual
textual interface is forced if this file exists
/etc/passwd
user database (see passwd(5))
/etc/session
fallback session script run upon login (see session(5))
/var/run/nologin
Further non-privileged logins are prohibited if this file exists and users attempting to log in are shown the contents of this file (see shutdown(8))

EXIT STATUS

login exits 0 if the computer should power off, exits 1 if the computer should reboot, exits 2 on fatal failure and the boot should halt, or exits 3 if the system should reinitialize.

SEE ALSO

passwd(1), crypt_checkpass(3), passwd(5), session(5), init(8), shutdown(8)

BUGS

login only supports a single monitor. The mouse code is less than perfect.

October 6, 2015 Sortix 1.1.0-dev
Copyright 2011-2025 Jonas 'Sortie' Termansen and contributors.
Sortix's source code is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org