summaryrefslogtreecommitdiff
path: root/usr/src/man/man8/logins.8
blob: 08ba31d3add7036c8f6f002aea3d78dba352a5ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
'\" te
.\"  Copyright 1989 AT&T Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH LOGINS 8 "Sep 6, 2005"
.SH NAME
logins \- list user and system login information
.SH SYNOPSIS
.LP
.nf
\fB/usr/bin/logins\fR [\fB-admopstux\fR] [\fB-g\fR \fIgroup...\fR]
     [\fB-l\fR \fIlogin_name...\fR]
.fi

.SH DESCRIPTION
.sp
.LP
This command displays information on user and system logins known to the
system. Contents of the output is controlled by the command options and can
include the following: user or system login, user id number, \fBpasswd\fR
account field value (user name or other information), primary group name,
primary group id, multiple group names, multiple group ids, home directory,
login shell, and four password aging parameters. The default information is the
following: login id, user id, primary group name, primary group id and the
account field value. Output is sorted by user id, system logins, followed by
user logins.
.SH OPTIONS
.sp
.LP
Options may be used together. If so, any login that matches any criteria are
displayed.
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.RS 20n
Add two password expiration fields to the display. The fields show how many
days a password can remain unused before it automatically becomes inactive, and
the date that the password expires.
.RE

.sp
.ne 2
.na
\fB\fB-d\fR\fR
.ad
.RS 20n
Selects logins with duplicate uids.
.RE

.sp
.ne 2
.na
\fB\fB\fR\fB-g\fR \fIgroup\fR\fR
.ad
.RS 20n
Selects all users belonging to \fBgroup\fR, sorted by login. Multiple groups
can be specified as a comma-separated list. When the \fB-l\fR and \fB-g\fR
options are combined, a user is only listed once, even if the user belongs to
more than one of the selected groups.
.RE

.sp
.ne 2
.na
\fB\fB\fR\fB-l\fR \fIlogin_name...\fR\fR
.ad
.RS 20n
Selects the requested login. Multiple logins can be specified as a
comma-separated list. Depending on the nameservice lookup types set in
\fB/etc/nsswitch.conf\fR, the information can come from the \fB/etc/passwd\fR
and \fB/etc/shadow\fR files and other nameservices. When the \fB-l\fR and
\fB-g\fR options are combined, a user is only listed once, even if the user
belongs to more than one of the selected groups.
.RE

.sp
.ne 2
.na
\fB\fB-m\fR\fR
.ad
.RS 20n
Displays multiple group membership information.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR\fR
.ad
.RS 20n
Formats output into one line of colon-separated fields.
.RE

.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.RS 20n
Selects logins with no passwords.
.RE

.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.RS 20n
Selects all system logins.
.RE

.sp
.ne 2
.na
\fB\fB-t\fR\fR
.ad
.RS 20n
Sorts output by login instead of by uid.
.RE

.sp
.ne 2
.na
\fB\fB-u\fR\fR
.ad
.RS 20n
Selects all user logins.
.RE

.sp
.ne 2
.na
\fB\fB-x\fR\fR
.ad
.RS 20n
Prints an extended set of information about each selected user. The extended
information includes home directory, login shell and password aging
information, each displayed on a separate line. The password information
currently consists of password status:
.sp
.ne 2
.na
\fB\fBNP\fR\fR
.ad
.RS 6n
Account has no password
.RE

.sp
.ne 2
.na
\fB\fBLK\fR\fR
.ad
.RS 6n
Account is locked for \fBUNIX\fR authentication
.RE

.sp
.ne 2
.na
\fB\fBNL\fR\fR
.ad
.RS 6n
Account is a no login account
.RE

.sp
.ne 2
.na
\fB\fBPS\fR\fR
.ad
.RS 6n
Account probably has a valid password
.RE

.sp
.ne 2
.na
\fB\fBUN\fR\fR
.ad
.RS 6n
Account password status is unknown. That is, it is not a recognizable hashed
password or any of the above entries. See \fBcrypt\fR(3C) for valid password
hashes.
.RE

If the login is passworded, status is followed by the date the password was
last changed, the number of days required between changes, and the number of
days allowed before a change is required. The password aging information shows
the time interval that the user receives a password expiration warning message
(when logging on) before the password expires.
.RE

.SH SEE ALSO
.sp
.LP
.BR passwd (1),
.BR crypt (3C),
.BR attributes (7)