]>
Commit | Line | Data |
---|---|---|
295b3979 | 1 | //po4a: entry man manual |
a7574d88 MB |
2 | // Copyright 2014 Ondrej Oprala (ondrej.oprala@gmail.com) |
3 | // May be distributed under the GNU General Public License | |
4 | = lslogins(1) | |
5 | :doctype: manpage | |
f42ed819 | 6 | :man manual: User Commands |
a7574d88 MB |
7 | :man source: util-linux {release-version} |
8 | :page-layout: base | |
9 | :command: lslogins | |
10 | ||
11 | == NAME | |
12 | ||
13 | lslogins - display information about known users in the system | |
14 | ||
15 | == SYNOPSIS | |
16 | ||
62fde24f | 17 | *lslogins* [options] [*-s*|*-u*[=_UID_]] [*-g* _groups_] [*-l* _logins_] [_username_] |
a7574d88 MB |
18 | |
19 | == DESCRIPTION | |
20 | ||
21 | Examine the wtmp and btmp logs, _/etc/shadow_ (if necessary) and _/passwd_ and output the desired data. | |
22 | ||
23 | The optional argument _username_ forces *lslogins* to print all available details about the specified user only. In this case the output format is different than in case of *-l* or *-g* and unknown is _username_ reported as an error. | |
24 | ||
25 | The default action is to list info about all the users in the system. | |
26 | ||
27 | == OPTIONS | |
28 | ||
29 | Mandatory arguments to long options are mandatory for short options too. | |
30 | ||
31 | *-a*, *--acc-expiration*:: | |
62fde24f | 32 | Display data about the date of last password change and the account expiration date (see *shadow*(5) for more info). (Requires root privileges.) |
a7574d88 | 33 | |
62fde24f MB |
34 | *--btmp-file* _path_:: |
35 | Alternate path for btmp. | |
a7574d88 MB |
36 | |
37 | *-c*, *--colon-separate*:: | |
62fde24f | 38 | Separate info about each user with a colon instead of a newline. |
a7574d88 MB |
39 | |
40 | *-e*, *--export*:: | |
62fde24f | 41 | Output data in the format of NAME=VALUE. |
a7574d88 MB |
42 | |
43 | *-f*, *--failed*:: | |
62fde24f | 44 | Display data about the users' last failed login attempts. |
a7574d88 MB |
45 | |
46 | *-G*, *--supp-groups*:: | |
62fde24f | 47 | Show information about supplementary groups. |
a7574d88 MB |
48 | |
49 | *-g*, **--groups**=_groups_:: | |
62fde24f MB |
50 | Only show data of users belonging to _groups_. More than one group may be specified; the list has to be comma-separated. Unknown group names are ignored. |
51 | + | |
52 | Note that relation between user and group may be invisible for primary group if the user is not explicitly specify as group member (e.g., in _/etc/group_). If the command *lslogins* scans for groups than it uses groups database only, and user database with primary GID is not used at all. | |
a7574d88 MB |
53 | |
54 | *-h*, *--help*:: | |
62fde24f | 55 | Display help information and exit. |
a7574d88 MB |
56 | |
57 | *-L*, *--last*:: | |
62fde24f | 58 | Display data containing information about the users' last login sessions. |
a7574d88 MB |
59 | |
60 | *-l*, **--logins**=_logins_:: | |
62fde24f | 61 | Only show data of users with a login specified in _logins_ (user names or user IDS). More than one login may be specified; the list has to be comma-separated. Unknown login names are ignored. |
a7574d88 MB |
62 | |
63 | *-n*, *--newline*:: | |
62fde24f | 64 | Display each piece of information on a separate line. |
a7574d88 MB |
65 | |
66 | *--noheadings*:: | |
62fde24f | 67 | Do not print a header line. |
a7574d88 MB |
68 | |
69 | *--notruncate*:: | |
62fde24f | 70 | Don't truncate output. |
a7574d88 MB |
71 | |
72 | *-o*, *--output* _list_:: | |
62fde24f | 73 | Specify which output columns to print. The default list of columns may be extended if _list_ is specified in the format _+list_. |
a7574d88 MB |
74 | |
75 | *--output-all*:: | |
62fde24f | 76 | Output all available columns. *--help* to get a list of all supported columns. |
a7574d88 MB |
77 | |
78 | *-p*, *--pwd*:: | |
62fde24f | 79 | Display information related to login by password (see also *-afL).* |
a7574d88 MB |
80 | |
81 | *-r*, *--raw*:: | |
62fde24f | 82 | Raw output (no columnation). |
a7574d88 MB |
83 | |
84 | *-s*, *--system-accs*:: | |
b53360d8 | 85 | Show system accounts. These are by default all accounts with a UID between 101 and 999 (inclusive), with the exception of either nobody or nfsnobody (UID 65534). This hardcoded default may be overwritten by parameters SYS_UID_MIN and SYS_UID_MAX in the file _/etc/login.defs_. |
a7574d88 MB |
86 | |
87 | *--time-format* _type_:: | |
62fde24f | 88 | Display dates in short, full or iso format. The default is short, this time format is designed to be space efficient and human readable. |
a7574d88 MB |
89 | |
90 | *-u*, *--user-accs*:: | |
62fde24f | 91 | Show user accounts. These are by default all accounts with UID above 1000 (inclusive), with the exception of either nobody or nfsnobody (UID 65534). This hardcoded default maybe overwritten by parameters UID_MIN and UID_MAX in the file _/etc/login.defs_. |
a7574d88 MB |
92 | |
93 | *-V*, *--version*:: | |
62fde24f | 94 | Display version information and exit. |
a7574d88 MB |
95 | |
96 | *--wtmp-file* _path_:: | |
62fde24f | 97 | Alternate path for wtmp. |
a7574d88 MB |
98 | |
99 | *--lastlog* _path_:: | |
62fde24f | 100 | Alternate path for *lastlog*(8). |
a7574d88 MB |
101 | |
102 | *-Z*, *--context*:: | |
62fde24f | 103 | Display the users' security context. |
a7574d88 MB |
104 | |
105 | *-z*, *--print0*:: | |
62fde24f | 106 | Delimit user entries with a nul character, instead of a newline. |
a7574d88 MB |
107 | |
108 | == EXIT STATUS | |
109 | ||
110 | 0:: | |
62fde24f | 111 | if OK, |
a7574d88 MB |
112 | |
113 | 1:: | |
62fde24f | 114 | if incorrect arguments specified, |
a7574d88 MB |
115 | |
116 | 2:: | |
62fde24f | 117 | if a serious error occurs (e.g., a corrupt log). |
a7574d88 MB |
118 | |
119 | == NOTES | |
120 | ||
121 | The default UID thresholds are read from _/etc/login.defs_. | |
122 | ||
123 | == HISTORY | |
124 | ||
125 | The *lslogins* utility is inspired by the *logins* utility, which first appeared in FreeBSD 4.10. | |
126 | ||
127 | == AUTHORS | |
128 | ||
62fde24f | 129 | mailto:ooprala@redhat.com[Ondrej Oprala], |
a7574d88 MB |
130 | mailto:kzak@redhat.com[Karel Zak] |
131 | ||
132 | == SEE ALSO | |
133 | ||
134 | *group*(5), | |
135 | *passwd*(5), | |
136 | *shadow*(5), | |
137 | *utmp*(5) | |
138 | ||
625e9c61 | 139 | include::man-common/bugreports.adoc[] |
a7574d88 | 140 | |
625e9c61 | 141 | include::man-common/footer.adoc[] |
a7574d88 MB |
142 | |
143 | ifdef::translation[] | |
625e9c61 | 144 | include::man-common/translation.adoc[] |
a7574d88 | 145 | endif::[] |