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
13       /etc/passwd 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
21       The default action is to list info about all the users in the system.
22

OPTIONS

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

NOTES

127       The default UID thresholds are read from /etc/login.defs.
128
129

EXIT STATUS

131       0      if OK,
132
133       1      if incorrect arguments specified,
134
135       2      if a serious error occurs (e.g., a corrupt log).
136

SEE ALSO

138       group(5), passwd(5), shadow(5), utmp(5)
139

HISTORY

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

AUTHORS

145       Ondrej Oprala ⟨ooprala@redhat.com⟩
146       Karel Zak ⟨kzak@redhat.com⟩
147
148

AVAILABILITY

150       The lslogins command is part of the util-linux package and is available
151       from Linux Kernel Archive ⟨https://www.kernel.org/pub/linux/utils/util-
152       linux/⟩.
153
154
155
156util-linux                        April 2014                       LSLOGINS(1)
Impressum