1LSLOGINS(1)                      User Commands                     LSLOGINS(1)
2
3
4

NAME

6       lslogins - display information about known users in the system
7

SYNOPSIS

9       lslogins [options] [-s|-u[=UID]] [-g groups] [-l logins] [username]
10

DESCRIPTION

12       Examine the wtmp and btmp logs, /etc/shadow (if necessary) and /passwd
13       and output the desired data.
14
15       The optional argument username forces lslogins to print all available
16       details about the specified user only. In this case the output format
17       is different than in case of -l or -g and unknown is username reported
18       as an error.
19
20       The default action is to list info about all the users in the system.
21

OPTIONS

23       Mandatory arguments to long options are mandatory for short options
24       too.
25
26       -a, --acc-expiration
27           Display data about the date of last password change and the account
28           expiration date (see shadow(5) for more info). (Requires root
29           privileges.)
30
31       --btmp-file path
32           Alternate path for btmp.
33
34       -c, --colon-separate
35           Separate info about each user with a colon instead of a newline.
36
37       -e, --export
38           Output data in the format of NAME=VALUE.
39
40       -f, --failed
41           Display data about the users' last failed login attempts.
42
43       -G, --supp-groups
44           Show information about supplementary groups.
45
46       -g, --groups=groups
47           Only show data of users belonging to groups. More than one group
48           may be specified; the list has to be comma-separated. Unknown group
49           names are ignored.
50
51           Note that relation between user and group may be invisible for
52           primary group if the user is not explicitly specify as group member
53           (e.g., in /etc/group). If the command lslogins scans for groups
54           than it uses groups database only, and user database with primary
55           GID is not used at all.
56
57       -h, --help
58           Display help information and exit.
59
60       -L, --last
61           Display data containing information about the users' last login
62           sessions.
63
64       -l, --logins=logins
65           Only show data of users with a login specified in logins (user
66           names or user IDS). More than one login may be specified; the list
67           has to be comma-separated. Unknown login names are ignored.
68
69       -n, --newline
70           Display each piece of information on a separate line.
71
72       --noheadings
73           Do not print a header line.
74
75       --notruncate
76           Don’t truncate output.
77
78       -o, --output list
79           Specify which output columns to print. The default list of columns
80           may be extended if list is specified in the format +list.
81
82       --output-all
83           Output all available columns. --help to get a list of all supported
84           columns.
85
86       -p, --pwd
87           Display information related to login by password (see also -afL).
88
89       -r, --raw
90           Raw output (no columnation).
91
92       -s, --system-accs
93           Show system accounts. These are by default all accounts with a UID
94           between 101 and 999 (inclusive), with the exception of either
95           nobody or nfsnobody (UID 65534). This hardcoded default may be
96           overwritten by parameters SYS_UID_MIN and SYS_UID_MAX in the file
97           /etc/login.defs.
98
99       --time-format type
100           Display dates in short, full or iso format. The default is short,
101           this time format is designed to be space efficient and human
102           readable.
103
104       -u, --user-accs
105           Show user accounts. These are by default all accounts with UID
106           above 1000 (inclusive), with the exception of either nobody or
107           nfsnobody (UID 65534). This hardcoded default maybe overwritten by
108           parameters UID_MIN and UID_MAX in the file /etc/login.defs.
109
110       -V, --version
111           Display version information and exit.
112
113       --wtmp-file path
114           Alternate path for wtmp.
115
116       --lastlog path
117           Alternate path for lastlog(8).
118
119       -Z, --context
120           Display the users' security context.
121
122       -z, --print0
123           Delimit user entries with a nul character, instead of a newline.
124

EXIT STATUS

126       0
127           if OK,
128
129       1
130           if incorrect arguments specified,
131
132       2
133           if a serious error occurs (e.g., a corrupt log).
134

NOTES

136       The default UID thresholds are read from /etc/login.defs.
137

HISTORY

139       The lslogins utility is inspired by the logins utility, which first
140       appeared in FreeBSD 4.10.
141

AUTHORS

143       Ondrej Oprala <ooprala@redhat.com>, Karel Zak <kzak@redhat.com>
144

SEE ALSO

146       group(5), passwd(5), shadow(5), utmp(5)
147

REPORTING BUGS

149       For bug reports, use the issue tracker at
150       https://github.com/karelzak/util-linux/issues.
151

AVAILABILITY

153       The lslogins command is part of the util-linux package which can be
154       downloaded from Linux Kernel Archive
155       <https://www.kernel.org/pub/linux/utils/util-linux/>.
156
157
158
159util-linux 2.37.2                 2021-06-02                       LSLOGINS(1)
Impressum