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 Mandatory arguments to long options are mandatory for short options
16 too.
17
18 The default action is to list info about all the users in the system.
19
21 Display info about existing users.
22
23 -a, --acc-expiration
24 Display data about the date of last password change and the
25 account expiration date (see shadow(5) for more info).
26 (Requires root priviliges.)
27
28 -e, --export
29 Output data in the format of NAME=VALUE.
30
31 -f, --failed
32 Display data about the users' last failed login attempts.
33
34 -G, --groups-info
35 Show information about groups.
36
37 -g, --groups=GROUPS
38 Only show data of users belonging to GROUPS. More than one group
39 may be specified; the list has to be comma-separated.
40
41 -l, --logins=LOGINS
42 Only show data of users with a login specified in LOGINS. More
43 than one login may be specified; the list has to be comma-sepa‐
44 rated.
45
46 -L, --last
47 Display data containing information about the users' last login
48 sessions.
49
50 -m, --supp-groups
51 Show supplementary groups.
52
53 --notruncate
54 Don't truncate output.
55
56 -o , --output list
57 Specify which output columns to print. Use --help to get a list
58 of all supported columns.
59
60 -p , --pwd
61 Display information related to login by password (see also
62 -afR).
63
64 -r, --raw
65 Raw output (no columnation).
66
67 -s, --system-accs
68 Show system accounts. These are by the default all accounts with
69 UID below 1000 (non-inclusive), with the exception of either
70 nobody or nfsnobody (UID 65534). The UID treshold can also be
71 specified explicitly (necessary for some distributions that
72 allocate UIDs starting from 100, 500 - or an entirely different
73 value - rather than 1000).
74
75 --time-format type
76 Display dates in short, full or iso format. The default is
77 short, this time format is designed to be space efficient and
78 human readable.
79
80 -u, --user-accs
81 Show user accounts. These are by the default all accounts with
82 UID above 1000 (inclusive), with the exception of either nobody
83 or nfsnobody (UID 65534). The UID treshold can also be specified
84 explicitly (necessary for some distributions that allocate UIDs
85 starting from 100, 500 - or an entirely different value - rather
86 than 1000).
87
88 -Z, --context
89 Display the users' security context.
90
91 --wtmp-file path
92 Alternate path for wtmp.
93
94 --btmp-file path
95 Alternate path for btmp.
96
97 -h, --help
98 Display help information and exit.
99
100 -V, --version
101 Display version information and exit.
102
103
105 The default UID tresholds are read from /etc/login.defs.
106
107
109 0 if OK,
110
111 1 if incorrect arguments specified,
112
113 2 if a serious error occurs (e.g. a corrupt log).
114
116 group(5), passwd(5), shadow(5), utmp(5)
117
119 The lslogins utility is inspired by the logins utility, which first
120 appeared in FreeBSD 4.10.
121
123 Ondrej Oprala ⟨ooprala@redhat.com⟩
124 Karel Zak ⟨kzak@redhat.com⟩
125
126
128 The lslogins command is part of the util-linux package and is available
129 from Linux Kernel Archive ⟨ftp://ftp.kernel.org/pub/linux/utils/util-
130 linux/⟩.
131
132
133
134util-linux April 2014 LSLOGINS(1)