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