]>
Commit | Line | Data |
---|---|---|
ab1cfad5 OO |
1 | .\" Copyright 2014 Ondrej Oprala (ondrej.oprala@gmail.com) |
2 | .\" May be distributed under the GNU General Public License | |
3 | .TH LSLOGINS "1" "April 2014" "util-linux" "User Commands" | |
4 | .SH NAME | |
5 | lslogins \- display information about known users in the system | |
6 | .SH SYNOPSIS | |
7 | .B lslogins | |
f49ccec2 BS |
8 | [options] |
9 | .RB [ \-s | \-u [ =\fIUID ]] | |
10 | .RB [ \-g " \fIgroups\fR]" | |
11 | .RB [ \-l " \fIlogins\fR]" | |
ab1cfad5 OO |
12 | .SH DESCRIPTION |
13 | .PP | |
14 | Examine the wtmp and btmp logs, /etc/shadow (if necessary) and /etc/passwd | |
15 | and output the desired data. | |
16 | .PP | |
ab1cfad5 OO |
17 | The default action is to list info about all the users in the system. |
18 | .SH OPTIONS | |
ce969b16 | 19 | Mandatory arguments to long options are mandatory for short options too. |
ab1cfad5 OO |
20 | .TP |
21 | \fB\-a\fR, \fB\-\-acc\-expiration\fR | |
512abd56 | 22 | Display data about the date of last password change and the account expiration |
a55f60a1 | 23 | date (see \fBshadow\fR(5) for more info). (Requires root privileges.) |
ce969b16 BS |
24 | .TP |
25 | \fB\-\-btmp\-file \fIpath\fP | |
26 | Alternate path for btmp. | |
ab1cfad5 | 27 | .TP |
512abd56 | 28 | \fB\-c\fR, \fB\-\-colon\-separate\fR |
ab1cfad5 OO |
29 | Separate info about each user with a colon instead of a newline. |
30 | .TP | |
ab1cfad5 OO |
31 | \fB\-e\fR, \fB\-\-export\fR |
32 | Output data in the format of NAME=VALUE. | |
33 | .TP | |
34 | \fB\-f\fR, \fB\-\-failed\fR | |
35 | Display data about the users' last failed login attempts. | |
36 | .TP | |
228bb39a | 37 | \fB\-G\fR, \fB\-\-supp\-groups\fR |
8b13a4d8 KZ |
38 | Show information about groups. |
39 | .TP | |
ce969b16 BS |
40 | \fB\-g\fR, \fB\-\-groups\fR=\fIgroups\fR |
41 | Only show data of users belonging to \fIgroups\fR. More than one group | |
42 | may be specified; the list has to be comma-separated. | |
ab1cfad5 | 43 | .TP |
ce969b16 BS |
44 | \fB\-h\fR, \fB\-\-help\fR |
45 | Display help information and exit. | |
ab1cfad5 | 46 | .TP |
ce969b16 | 47 | \fB\-L\fR, \fB\-\-last\fR |
512abd56 KZ |
48 | Display data containing information about the users' last login sessions. |
49 | .TP | |
ce969b16 BS |
50 | \fB\-l\fR, \fB\-\-logins\fR=\fIlogins\fR |
51 | Only show data of users with a login specified in \fIlogins\fR (user names or user | |
52 | IDS). More than one login may be specified; the list has to be comma-separated. | |
53 | .TP | |
ab1cfad5 OO |
54 | \fB\-n\fR, \fB\-\-newline\fR |
55 | Display each piece of information on a separate line. | |
56 | .TP | |
4b6ae071 KZ |
57 | \fB\-\-noheadings\fR |
58 | Do not print a header line. | |
59 | .TP | |
512abd56 KZ |
60 | \fB\-\-notruncate\fR |
61 | Don't truncate output. | |
62 | .TP | |
ce969b16 | 63 | \fB\-o\fR, \fB\-\-output \fIlist\fP |
512abd56 KZ |
64 | Specify which output columns to print. Use |
65 | .B \-\-help | |
66 | to get a list of all supported columns. | |
b3f4f056 | 67 | .TP |
ce969b16 BS |
68 | \fB\-p\fR, \fB\-\-pwd\fR |
69 | Display information related to login by password (see also \fB\-afL). | |
ab1cfad5 OO |
70 | .TP |
71 | \fB\-r\fR, \fB\-\-raw\fR | |
72 | Raw output (no columnation). | |
73 | .TP | |
2b8a9bda | 74 | \fB\-s\fR, \fB\-\-system\-accs\fR |
ce969b16 | 75 | Show system accounts. These are by default all accounts with a UID below 1000 |
2b8a9bda KZ |
76 | (non-inclusive), with the exception of either nobody or nfsnobody (UID 65534). |
77 | This hardcoded default maybe overwritten by parameters SYS_UID_MIN and SYS_UID_MAX in | |
78 | the file /etc/login.defs. | |
ab1cfad5 | 79 | .TP |
b06c1ca6 | 80 | \fB\-\-time\-format\fR \fItype\fP |
ce969b16 | 81 | Display dates in short, full or iso format. The default is short, this time |
ea24eacc | 82 | format is designed to be space efficient and human readable. |
512abd56 | 83 | .TP |
2b8a9bda | 84 | \fB\-u\fR, \fB\-\-user\-accs\fR |
ce969b16 | 85 | Show user accounts. These are by default all accounts with UID above 1000 |
2b8a9bda KZ |
86 | (inclusive), with the exception of either nobody or nfsnobody (UID 65534). |
87 | This hardcoded default maybe overwritten by parameters UID_MIN and UID_MAX in | |
88 | the file /etc/login.defs. | |
ab1cfad5 | 89 | .TP |
ce969b16 BS |
90 | \fB\-V\fR, \fB\-\-version\fR |
91 | Display version information and exit. | |
29cc2a55 | 92 | .TP |
512abd56 KZ |
93 | \fB\-\-wtmp\-file \fIpath\fP |
94 | Alternate path for wtmp. | |
95 | .TP | |
ce969b16 BS |
96 | \fB\-Z\fR, \fB\-\-context\fR |
97 | Display the users' security context. | |
512abd56 | 98 | .TP |
ce969b16 BS |
99 | \fB\-z\fR, \fB\-\-print0\fR |
100 | Delimit user entries with a nul character, instead of a newline. | |
ab1cfad5 | 101 | |
512abd56 | 102 | .SH NOTES |
ce969b16 | 103 | The default UID thresholds are read from /etc/login.defs. |
ab1cfad5 | 104 | |
ab1cfad5 OO |
105 | .SH EXIT STATUS |
106 | .TP | |
107 | 0 | |
108 | if OK, | |
109 | .TP | |
110 | 1 | |
111 | if incorrect arguments specified, | |
112 | .TP | |
113 | 2 | |
114 | if a serious error occurs (e.g. a corrupt log). | |
115 | .SH SEE ALSO | |
116 | \fBgroup\fP(5), \fBpasswd\fP(5), \fBshadow\fP(5), \fButmp\fP(5) | |
117 | .SH HISTORY | |
118 | The \fBlslogins\fP utility is inspired by the \fBlogins\fP utility, which first appeared in FreeBSD 4.10. | |
119 | .SH AUTHORS | |
b3f4f056 | 120 | .MT ooprala@redhat.com |
ab1cfad5 OO |
121 | Ondrej Oprala |
122 | .ME | |
b3f4f056 KZ |
123 | .br |
124 | .MT kzak@redhat.com | |
125 | Karel Zak | |
126 | .ME | |
127 | ||
ab1cfad5 OO |
128 | .SH AVAILABILITY |
129 | The lslogins command is part of the util-linux package and is available from | |
d673b74e | 130 | .UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/ |
ab1cfad5 OO |
131 | Linux Kernel Archive |
132 | .UE . |