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