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.  Use --help to get a list
82              of all supported columns.
83
84       -p, --pwd
85              Display  information  related  to  login  by  password (see also
86              -afL).
87
88       -r, --raw
89              Raw output (no columnation).
90
91       -s, --system-accs
92              Show system accounts.  These are by default all accounts with  a
93              UID  below  1000  (non-inclusive),  with the exception of either
94              nobody or nfsnobody (UID 65534).  This hardcoded  default  maybe
95              overwritten  by  parameters  SYS_UID_MIN  and SYS_UID_MAX in the
96              file /etc/login.defs.
97
98       --time-format type
99              Display dates in short, full or  iso  format.   The  default  is
100              short,  this  time  format is designed to be space efficient and
101              human readable.
102
103       -u, --user-accs
104              Show user accounts.  These are by default all accounts with  UID
105              above  1000  (inclusive), with the exception of either nobody or
106              nfsnobody (UID 65534).  This hardcoded default maybe overwritten
107              by parameters UID_MIN and UID_MAX in the file /etc/login.defs.
108
109       -V, --version
110              Display version information and exit.
111
112       --wtmp-file path
113              Alternate path for wtmp.
114
115       -Z, --context
116              Display the users' security context.
117
118       -z, --print0
119              Delimit user entries with a nul character, instead of a newline.
120
121

NOTES

123       The default UID thresholds are read from /etc/login.defs.
124
125

EXIT STATUS

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

SEE ALSO

134       group(5), passwd(5), shadow(5), utmp(5)
135

HISTORY

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

AUTHORS

141       Ondrej Oprala ⟨ooprala@redhat.com⟩
142       Karel Zak ⟨kzak@redhat.com⟩
143
144

AVAILABILITY

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