]> git.ipfire.org Git - thirdparty/util-linux.git/blob - login-utils/lslogins.1
docs: replace FTP by HTTPS in kernel.org URLs
[thirdparty/util-linux.git] / login-utils / lslogins.1
1 .\" Copyright 2014 Ondrej Oprala (ondrej.oprala@gmail.com)
2 .\" May be distributed under the GNU General Public License
3 .TH LSLOGINS "1" "April 2014" "util-linux" "User Commands"
4 .SH NAME
5 lslogins \- display information about known users in the system
6 .SH SYNOPSIS
7 .B lslogins
8 [options]
9 .RB [ \-s | \-u [ =\fIUID ]]
10 .RB [ \-g " \fIgroups\fR]"
11 .RB [ \-l " \fIlogins\fR]"
12 .SH DESCRIPTION
13 .PP
14 Examine the wtmp and btmp logs, /etc/shadow (if necessary) and /etc/passwd
15 and output the desired data.
16 .PP
17 The default action is to list info about all the users in the system.
18 .SH OPTIONS
19 Mandatory arguments to long options are mandatory for short options too.
20 .TP
21 \fB\-a\fR, \fB\-\-acc\-expiration\fR
22 Display data about the date of last password change and the account expiration
23 date (see \fBshadow\fR(5) for more info). (Requires root privileges.)
24 .TP
25 \fB\-\-btmp\-file \fIpath\fP
26 Alternate path for btmp.
27 .TP
28 \fB\-c\fR, \fB\-\-colon\-separate\fR
29 Separate info about each user with a colon instead of a newline.
30 .TP
31 \fB\-e\fR, \fB\-\-export\fR
32 Output data in the format of NAME=VALUE.
33 .TP
34 \fB\-f\fR, \fB\-\-failed\fR
35 Display data about the users' last failed login attempts.
36 .TP
37 \fB\-G\fR, \fB\-\-supp\-groups\fR
38 Show information about groups.
39 .TP
40 \fB\-g\fR, \fB\-\-groups\fR=\fIgroups\fR
41 Only show data of users belonging to \fIgroups\fR. More than one group
42 may be specified; the list has to be comma-separated.
43 .TP
44 \fB\-h\fR, \fB\-\-help\fR
45 Display help information and exit.
46 .TP
47 \fB\-L\fR, \fB\-\-last\fR
48 Display data containing information about the users' last login sessions.
49 .TP
50 \fB\-l\fR, \fB\-\-logins\fR=\fIlogins\fR
51 Only show data of users with a login specified in \fIlogins\fR (user names or user
52 IDS). More than one login may be specified; the list has to be comma-separated.
53 .TP
54 \fB\-n\fR, \fB\-\-newline\fR
55 Display each piece of information on a separate line.
56 .TP
57 \fB\-\-noheadings\fR
58 Do not print a header line.
59 .TP
60 \fB\-\-notruncate\fR
61 Don't truncate output.
62 .TP
63 \fB\-o\fR, \fB\-\-output \fIlist\fP
64 Specify which output columns to print. Use
65 .B \-\-help
66 to get a list of all supported columns.
67 .TP
68 \fB\-p\fR, \fB\-\-pwd\fR
69 Display information related to login by password (see also \fB\-afL).
70 .TP
71 \fB\-r\fR, \fB\-\-raw\fR
72 Raw output (no columnation).
73 .TP
74 \fB\-s\fR, \fB\-\-system\-accs\fR
75 Show system accounts. These are by default all accounts with a UID below 1000
76 (non-inclusive), with the exception of either nobody or nfsnobody (UID 65534).
77 This hardcoded default maybe overwritten by parameters SYS_UID_MIN and SYS_UID_MAX in
78 the file /etc/login.defs.
79 .TP
80 \fB\-\-time\-format\fR \fItype\fP
81 Display dates in short, full or iso format. The default is short, this time
82 format is designed to be space efficient and human readable.
83 .TP
84 \fB\-u\fR, \fB\-\-user\-accs\fR
85 Show user accounts. These are by default all accounts with UID above 1000
86 (inclusive), with the exception of either nobody or nfsnobody (UID 65534).
87 This hardcoded default maybe overwritten by parameters UID_MIN and UID_MAX in
88 the file /etc/login.defs.
89 .TP
90 \fB\-V\fR, \fB\-\-version\fR
91 Display version information and exit.
92 .TP
93 \fB\-\-wtmp\-file \fIpath\fP
94 Alternate path for wtmp.
95 .TP
96 \fB\-Z\fR, \fB\-\-context\fR
97 Display the users' security context.
98 .TP
99 \fB\-z\fR, \fB\-\-print0\fR
100 Delimit user entries with a nul character, instead of a newline.
101
102 .SH NOTES
103 The default UID thresholds are read from /etc/login.defs.
104
105 .SH EXIT STATUS
106 .TP
107 0
108 if OK,
109 .TP
110 1
111 if incorrect arguments specified,
112 .TP
113 2
114 if a serious error occurs (e.g. a corrupt log).
115 .SH SEE ALSO
116 \fBgroup\fP(5), \fBpasswd\fP(5), \fBshadow\fP(5), \fButmp\fP(5)
117 .SH HISTORY
118 The \fBlslogins\fP utility is inspired by the \fBlogins\fP utility, which first appeared in FreeBSD 4.10.
119 .SH AUTHORS
120 .MT ooprala@redhat.com
121 Ondrej Oprala
122 .ME
123 .br
124 .MT kzak@redhat.com
125 Karel Zak
126 .ME
127
128 .SH AVAILABILITY
129 The lslogins command is part of the util-linux package and is available from
130 .UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
131 Linux Kernel Archive
132 .UE .