LSLOGINS(1)

๐Ÿ’– LSLOGINS(1) โ€” the lslogins manual, but make it cute ๐Ÿ’–

okay bestie, welcome to lslogins(1) โ€” yes that's the manual page name, and yes we're reading it together, grab a snack ๐Ÿ“


๐ŸŒธ NAME ๐ŸŒธ

lslogins โ€” display information about known users in the system


โœจ SYNOPSIS โœจ

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

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So what does it actually do? It goes and examines the wtmp and btmp logs, peeks at /etc/shadow (only if necessary, mind you), and also /passwd, and then outputs all the data you asked for. Lowkey nosy but in a helpful way ๐Ÿ’…

The optional username argument forces lslogins to print all available details about the specified user only. Heads up though: when you do that, the output format is different than with -l or -g, and an unknown username gets reported as an error. Not a vibe, but okay.

The default action? List info about all the users in the system. Main character behavior honestly ๐Ÿ‘‘


๐ŸŽ€ OPTIONS ๐ŸŽ€

Mandatory arguments to long options are mandatory for short options too. (yes, that rule still applies, no shortcuts bestie)

  • -a, --acc-expiration โ€” Display data about the date of last password change and the account expiration date (peep shadow(5) for more info). ๐Ÿ”’ Requires root privileges, so don't try this one without the crown.
  • --btmp-file path โ€” Alternate path for btmp.
  • -c, --colon-separate โ€” Separate info about each user with a colon instead of a newline.
  • -e, --export โ€” Output data in the format of NAME=VALUE. Also see option --shell.
  • -f, --failed โ€” Display data about the users' last failed login attempts. ๐Ÿ˜ญ the flop era receipts
  • -G, --supp-groups โ€” Show information about supplementary groups.
  • -g, --groups groups โ€” 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.

Note that the relation between user and group may be invisible for the primary group if the user is not explicitly specified as group member (e.g., in /etc/group). If the command lslogins scans for groups then it uses the groups database only, and the user database with primary GID is not used at all.

  • -L, --last โ€” Display data containing information about the users' last login sessions.
  • -l, --logins logins โ€” 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.
  • -n, --newline โ€” Display each piece of information on a separate line.
  • --noheadings โ€” Do not print a header line.
  • --notruncate โ€” Don't truncate output.
  • -o, --output list โ€” Specify which output columns to print. The default list of columns may be extended if list is specified in the format +list.
  • --output-all โ€” Output all available columns. --list-columns to get a list of all supported columns.
  • -H, --list-columns โ€” List the columns that can be specified with the --output option. Can be used with --json or --raw to get the list in a machine-readable format.
  • -p, --pwd โ€” Display information related to login by password (see also -afL).
  • -r, --raw โ€” Raw output (no columnation).
  • -J, --json โ€” JSON format output.
  • -s, --system-accs โ€” 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 overridden by the parameters SYS_UID_MIN and SYS_UID_MAX in the file /etc/login.defs.
  • --time-format type โ€” Display dates in short, full or iso format. The default is short, this time format is designed to be space efficient and human readable.
  • -u, --user-accs โ€” Show user accounts. These are by default all accounts with a UID above 1000 (inclusive), with the exception of either nobody or nfsnobody (UID 65534). This hardcoded default may be overridden by the parameters UID_MIN and UID_MAX in the file /etc/login.defs.
  • -h, --help โ€” Display help text and exit.
  • -V, --version โ€” Display version and exit.
  • --wtmp-file path โ€” Alternate path for wtmp.
  • --lastlog-file path โ€” Alternate path for lastlog(8).
  • -y, --shell โ€” The column name will be modified to contain only characters allowed for shell variable identifiers. This is usable, for example, with --export. Note that this feature has been automatically enabled for --export in version 2.37, but due to compatibility issues, now it's necessary to request this behavior by --shell. ๐Ÿซ  the drama
  • -Z, --context โ€” Display the users' security context.
  • -z, --print0 โ€” Delimit user entries with a nul character, instead of a newline.

๐Ÿ’€ EXIT STATUS ๐Ÿ’€

  • 0 โ€” if OK,
  • 1 โ€” if incorrect arguments specified,
  • 2 โ€” if a serious error occurs (e.g., a corrupt log).

๐ŸŒˆ NOTES ๐ŸŒˆ

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

๐Ÿ” Password status

Multiple fields describe password status.

  • "Password is locked" โ€” The password is prefixed by '!!', and the user cannot login although the password is set or empty. This is common for new accounts without a set password.
  • "Password not required (empty)" โ€” The password is not set (hash is missing); this is common for locked system accounts. Not requiring a password does not mean the user can log-in without a password. It depends on the password "lock" status.
  • "Login by password disabled" โ€” 'yes' means that there is no valid password. The password hash is missing, or the hash method is unknown or contains invalid chars.

๐Ÿงš ENVIRONMENT ๐Ÿงš

  • LIBSMARTCOLS_DEBUG=all โ€” enables libsmartcols debug output.
  • LIBSMARTCOLS_DEBUG_PADDING=on โ€” use visible padding characters.
  • LIBSMARTCOLS_JSON=compact|lines โ€” Controls JSON output format when using --json. Supported values are compact for JSON output with minimal whitespace, and lines for JSON Lines format (one JSON object per line). If unset or set to any other value, pretty-printed JSON is used.

๐Ÿ“œ HISTORY ๐Ÿ“œ

The lslogins utility is inspired by the logins utility, which first appeared in FreeBSD 4.10. ancestry reveal โœจ


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

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


๐Ÿ’œ SEE ALSO ๐Ÿ’œ

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


๐Ÿ› REPORTING BUGS ๐Ÿ›

For bug reports, use the issue tracker <https://github.com/util-linux/util-linux/issues>.


๐ŸŒŸ AVAILABILITY ๐ŸŒŸ

The lslogins command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


and that's the whole page bestie, no cap ๐Ÿ’… this was util-linux 2.42.4, dated 2026-09-21, and it's giving LSLOGINS(1) energy โ€” go forth and inspect those users ๐Ÿซถ๐ŸŒธ

๐Ÿ“ฆ where this page comes from
  • arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms