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

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.
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

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

/etc/passwd
user database (see passwd(5))
/etc/login.conf.textual
textual interface is forced if this file exists

EXIT STATUS

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

SEE ALSO

passwd(1), crypt_checkpass(3), passwd(5), init(8), login(8)

BUGS

login only supports a single monitor. The mouse code is less than perfect.
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