2017-06-03 19:27:30 +00:00
|
|
|
.Dd October 6, 2015
|
2015-12-25 02:24:51 +00:00
|
|
|
.Dt LOGIN 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm login
|
|
|
|
.Nd authenticate users and run personal session
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm login
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm login
|
|
|
|
interactively authenticates users by asking them to enter their username and
|
2017-02-15 21:56:28 +00:00
|
|
|
password.
|
|
|
|
The passwords are checked against the password hashes in
|
2015-12-25 02:24:51 +00:00
|
|
|
.Pa /etc/passwd
|
|
|
|
as described in
|
|
|
|
.Xr passwd 5 .
|
|
|
|
.Nm login
|
|
|
|
creates a session as the requested user upon successful authentication.
|
|
|
|
.Pp
|
|
|
|
.Nm login
|
|
|
|
has a graphical interface if the display is graphical and uses a textual
|
2017-02-15 21:56:28 +00:00
|
|
|
interface otherwise.
|
|
|
|
The textual interface is forced if
|
2015-12-25 02:24:51 +00:00
|
|
|
.Pa /etc/login.conf.textual
|
2017-02-15 21:56:28 +00:00
|
|
|
exists.
|
|
|
|
The process remains running in the background and takes over again when the user
|
|
|
|
session exits.
|
2015-12-25 02:24:51 +00:00
|
|
|
.Pp
|
2022-09-18 19:54:21 +00:00
|
|
|
The user's
|
|
|
|
.Xr session 5
|
|
|
|
is created upon login by running the user's
|
|
|
|
.Pa ~/.session
|
|
|
|
script if it exists and is executable, otherwise attempting
|
|
|
|
.Pa /etc/session ,
|
|
|
|
and ultimately falling back on the user's shell from
|
|
|
|
.Xr passwd 5 .
|
2023-04-02 20:20:09 +00:00
|
|
|
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.
|
2022-09-18 19:54:21 +00:00
|
|
|
.Pp
|
2015-12-25 02:24:51 +00:00
|
|
|
Type a special username to perform special options:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width "poweroff" -compact -offset indent
|
|
|
|
.It exit
|
|
|
|
alias for poweroff
|
|
|
|
.It poweroff
|
|
|
|
exit asking for powering off the computer
|
|
|
|
.It reboot
|
|
|
|
exit asking for rebooting the computer
|
2021-12-11 02:28:59 +00:00
|
|
|
.It halt
|
|
|
|
exit asking for halting the computer
|
2015-12-25 02:24:51 +00:00
|
|
|
.El
|
|
|
|
.Sh SECURITY
|
|
|
|
There is currently no method to confirm the login screen is in fact real other
|
2017-02-15 21:56:28 +00:00
|
|
|
than witnessing a pristine boot.
|
|
|
|
Local users can log in and show a counterfeit login screen that look and behave
|
|
|
|
like the real
|
2015-12-25 02:24:51 +00:00
|
|
|
.Nm login
|
|
|
|
program and trick the next user into revealing their password.
|
|
|
|
.Sh ENVIRONMENT
|
|
|
|
.Nm login
|
|
|
|
sets the following environment variables to match the authenticated user:
|
|
|
|
.Bl -tag -width "LOGNAME"
|
|
|
|
.It Ev HOME
|
|
|
|
home directory
|
|
|
|
.It Ev LOGNAME
|
|
|
|
username
|
|
|
|
.It Ev SHELL
|
|
|
|
shell
|
|
|
|
.It Ev USER
|
|
|
|
username
|
|
|
|
.El
|
|
|
|
.Sh FILES
|
2022-09-18 19:54:21 +00:00
|
|
|
.Bl -tag -width "/etc/login.conf.textual" -compact
|
|
|
|
.It Pa ~/.session
|
|
|
|
user session script run upon login (see
|
|
|
|
.Xr session 5 )
|
|
|
|
.It Pa /etc/login.conf.textual
|
|
|
|
textual interface is forced if this file exists
|
2015-12-25 02:24:51 +00:00
|
|
|
.It Pa /etc/passwd
|
|
|
|
user database (see
|
|
|
|
.Xr passwd 5 )
|
2022-09-18 19:54:21 +00:00
|
|
|
.It Pa /etc/session
|
|
|
|
fallback session script run upon login (see
|
|
|
|
.Xr session 5 )
|
2015-12-25 02:24:51 +00:00
|
|
|
.El
|
|
|
|
.Sh EXIT STATUS
|
|
|
|
.Nm 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.
|
|
|
|
.Sh SEE ALSO
|
2015-11-25 18:18:14 +00:00
|
|
|
.Xr passwd 1 ,
|
2015-12-25 02:24:51 +00:00
|
|
|
.Xr crypt_checkpass 3 ,
|
|
|
|
.Xr passwd 5 ,
|
2022-09-18 19:54:21 +00:00
|
|
|
.Xr session 5 ,
|
2015-12-25 02:24:51 +00:00
|
|
|
.Xr init 8 ,
|
|
|
|
.Xr login 8
|
|
|
|
.Sh BUGS
|
|
|
|
.Nm login
|
2017-02-15 21:56:28 +00:00
|
|
|
only supports a single monitor.
|
|
|
|
The mouse code is less than perfect.
|