|
|
1.1 root 1: .\" Copyright (c) 1980, 1990 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)login.1 6.8 (Berkeley) 7/24/90
6: .\"
7: .Dd July 24, 1990
8: .Dt LOGIN 1
9: .Os BSD 4
10: .Sh NAME
11: .Nm login
12: .Nd sign on
13: .Sh SYNOPSIS
14: .Nm login
15: .Op Fl p
16: .Op Ar username
17: .Nm login
18: .Op Fl p
19: .Op Fl h Ar hostname
20: .Op Fl f
21: .Op Ar username
22: .Sh DESCRIPTION
23: The
24: .Nm login
25: command
26: is used when a user initially
27: signs on.
28: It may also be used at any time to change
29: from one user to another.
30: This case is the one summarized first above and described here.
31: See
32: .Em How to Get Started
33: for how to connect initially.
34: The invocation of
35: .Nm login
36: for initial sign-on
37: is made by a system program or server using the latter form of the command
38: and is described below.
39: .Pp
40: If
41: .Nm login
42: is invoked without an argument,
43: it asks for a user name, and, if
44: appropriate, a password.
45: Echoing is turned off (if possible) during the typing of the password,
46: so it will not appear on the written record of the
47: session.
48: .Pp
49: After a successful login,
50: accounting files are updated and
51: the user is informed of the
52: existence of mail.
53: The message of the day is printed,
54: as is the time of his last login.
55: Both are suppressed if he has a
56: .Dq Pa .hushlogin
57: file in his home directory; this
58: is mostly used to make life easier for non-human users, such as
59: .Xr uucp 1 .
60: .Pp
61: .Nm Login
62: initializes the user and group IDs and the working directory,
63: then executes a command interpreter (usually
64: .Xr csh 1 )
65: according to specifications found in a password file.
66: Argument 0 of the command interpreter is
67: the name of the command interpreter with
68: a leading dash
69: .Sq Fl .
70: .Pp
71: Login also modifies the
72: environment (see
73: .Xr environ 7 )
74: with information specifying home directory, command interpreter, terminal
75: type (if available) and user name.
76: .Pp
77: Options:
78: .Pp
79: .Tw Ds
80: .Tp Fl p
81: Causes the remainder of the environment to be preserved,
82: otherwise any previous environment is discarded.
83: .Tp Fl h
84: option is used by
85: .Xr telnetd 8
86: (at initial login)
87: and other servers to list the host from which
88: the connection was received.
89: .Tp Fl f
90: Used with a username on the command line, at initial login,
91: to indicate that proper authentication has already been done
92: and that no password need be requested.
93: This option may be used by the superuser
94: or by the user specified on the command line.
95: .Tp
96: .Pp
97: If the file
98: .Pa /etc/nologin
99: exists,
100: .Nm login
101: prints its contents on the user's terminal and exits. This is
102: used by
103: .Xr shutdown 8
104: to stop users logging in when the system is about to go down.
105: .Pp
106: Login is recognized by
107: .Xr sh 1
108: and
109: .Xr csh 1
110: and executed directly (without forking).
111: .Sh FILES
112: .Dw /var/log/wtmp
113: .Di L
114: .Dp Pa /var/run/utmp
115: accounting
116: .Dp Pa /var/log/wtmp
117: accounting
118: .Dp Pa /var/mail/*
119: mail
120: .Dp Pa /etc/motd
121: message-of-the-day
122: .Dp Pa /etc/passwd
123: password file
124: .Dp Pa /etc/nologin
125: stops logins
126: .Dp Pa \&.hushlogin
127: makes login quieter
128: .Dp
129: .Sh SEE ALSO
130: .Xr mail 1 ,
131: .Xr passwd 1 ,
132: .Xr rlogin 1 ,
133: .Xr getpass 3 ,
134: .Xr passwd 5 ,
135: .Xr utmp 5 ,
136: .Xr environ 7 ,
137: .Xr init 8 ,
138: .Xr getty 8 ,
139: .Xr shutdown 8 ,
140: .Sh HISTORY
141: .Nm login
142: appeared in Version 6 AT&T Unix.
143: .Sh DIAGNOSTICS
144: .Dw Fl
145: .Di L
146: .Dp Li Login incorrect
147: if the name or the password is bad.
148: .Dp Li No Shell
149: .Dp Li cannot open password file
150: .Dp Li no directory
151: consult a programming counselor.
152: .Dp
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.