{
    "content": [
        {
            "type": "text",
            "text": "# lslogins (man)\n\n## NAME\n\nlslogins - display information about known users in the system\n\n## SYNOPSIS\n\nlslogins [options] [-s|-u[=UID]] [-g groups] [-l logins] [username]\n\n## DESCRIPTION\n\nExamine the wtmp and btmp logs, /etc/shadow (if necessary) and /passwd and output the desired\ndata.\n\n## TLDR\n\n> Show information about users on a Linux system.\n\n- Display users in the system:\n  `lslogins`\n- Display users belonging to a specific group:\n  `lslogins {{-g|--groups}} {{groups}}`\n- Display user accounts:\n  `lslogins {{-u|--user-accs}}`\n- Display last logins:\n  `lslogins {{-L|--last}}`\n- Display system accounts:\n  `lslogins {{-s|--system-accs}}`\n- Display supplementary groups:\n  `lslogins {{-G|--supp-groups}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (21 subsections)\n- **EXIT STATUS**\n- **NOTES**\n- **HISTORY**\n- **AUTHORS**\n- **SEE ALSO**\n- **REPORTING BUGS**\n- **AVAILABILITY**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "lslogins",
        "section": "",
        "mode": "man",
        "summary": "lslogins - display information about known users in the system",
        "synopsis": "lslogins [options] [-s|-u[=UID]] [-g groups] [-l logins] [username]",
        "tldr_summary": "Show information about users on a Linux system.",
        "tldr_examples": [
            {
                "description": "Display users in the system",
                "command": "lslogins"
            },
            {
                "description": "Display users belonging to a specific group",
                "command": "lslogins {{-g|--groups}} {{groups}}"
            },
            {
                "description": "Display user accounts",
                "command": "lslogins {{-u|--user-accs}}"
            },
            {
                "description": "Display last logins",
                "command": "lslogins {{-L|--last}}"
            },
            {
                "description": "Display system accounts",
                "command": "lslogins {{-s|--system-accs}}"
            },
            {
                "description": "Display supplementary groups",
                "command": "lslogins {{-G|--supp-groups}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-a",
                "long": "--acc-expiration",
                "arg": null,
                "description": "Display data about the date of last password change and the account expiration date (see shadow(5) for more info). (Requires root privileges.) --btmp-file path Alternate path for btmp."
            },
            {
                "flag": "-c",
                "long": "--colon-separate",
                "arg": null,
                "description": "Separate info about each user with a colon instead of a newline."
            },
            {
                "flag": "-e",
                "long": "--export",
                "arg": null,
                "description": "Output data in the format of NAME=VALUE."
            },
            {
                "flag": "-f",
                "long": "--failed",
                "arg": null,
                "description": "Display data about the users' last failed login attempts."
            },
            {
                "flag": "-G",
                "long": "--supp-groups",
                "arg": null,
                "description": "Show information about supplementary groups."
            },
            {
                "flag": "-g",
                "long": "--groups",
                "arg": null,
                "description": "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 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."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help information and exit."
            },
            {
                "flag": "-L",
                "long": "--last",
                "arg": null,
                "description": "Display data containing information about the users' last login sessions."
            },
            {
                "flag": "-l",
                "long": "--logins",
                "arg": null,
                "description": "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."
            },
            {
                "flag": "-n",
                "long": "--newline",
                "arg": null,
                "description": "Display each piece of information on a separate line."
            },
            {
                "flag": "",
                "long": "--noheadings",
                "arg": null,
                "description": "Do not print a header line."
            },
            {
                "flag": "",
                "long": "--notruncate",
                "arg": null,
                "description": "Don’t truncate output."
            },
            {
                "flag": "-o",
                "long": "--output",
                "arg": null,
                "description": "Specify which output columns to print. The default list of columns may be extended if list is specified in the format +list."
            },
            {
                "flag": "",
                "long": "--output-all",
                "arg": null,
                "description": "Output all available columns. --help to get a list of all supported columns."
            },
            {
                "flag": "-p",
                "long": "--pwd",
                "arg": null,
                "description": "Display information related to login by password (see also -afL)."
            },
            {
                "flag": "-r",
                "long": "--raw",
                "arg": null,
                "description": "Raw output (no columnation)."
            },
            {
                "flag": "-s",
                "long": "--system-accs",
                "arg": null,
                "description": "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 SYSUIDMIN and SYSUIDMAX 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."
            },
            {
                "flag": "-u",
                "long": "--user-accs",
                "arg": null,
                "description": "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 UIDMIN and UIDMAX in the file /etc/login.defs."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Display version information and exit. --wtmp-file path Alternate path for wtmp. --lastlog path Alternate path for lastlog(8)."
            },
            {
                "flag": "-Z",
                "long": "--context",
                "arg": null,
                "description": "Display the users' security context."
            },
            {
                "flag": "-z",
                "long": "--print0",
                "arg": null,
                "description": "Delimit user entries with a nul character, instead of a newline."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "group",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/group/5/json"
            },
            {
                "name": "passwd",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/passwd/5/json"
            },
            {
                "name": "shadow",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/shadow/5/json"
            },
            {
                "name": "utmp",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/utmp/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "-a --acc-expiration",
                        "lines": 6,
                        "flag": "-a",
                        "long": "--acc-expiration"
                    },
                    {
                        "name": "-c --colon-separate",
                        "lines": 2,
                        "flag": "-c",
                        "long": "--colon-separate"
                    },
                    {
                        "name": "-e --export",
                        "lines": 2,
                        "flag": "-e",
                        "long": "--export"
                    },
                    {
                        "name": "-f --failed",
                        "lines": 2,
                        "flag": "-f",
                        "long": "--failed"
                    },
                    {
                        "name": "-G --supp-groups",
                        "lines": 2,
                        "flag": "-G",
                        "long": "--supp-groups"
                    },
                    {
                        "name": "-g --groups",
                        "lines": 8,
                        "flag": "-g",
                        "long": "--groups"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-L --last",
                        "lines": 2,
                        "flag": "-L",
                        "long": "--last"
                    },
                    {
                        "name": "-l --logins",
                        "lines": 4,
                        "flag": "-l",
                        "long": "--logins"
                    },
                    {
                        "name": "-n --newline",
                        "lines": 2,
                        "flag": "-n",
                        "long": "--newline"
                    },
                    {
                        "name": "--noheadings",
                        "lines": 2,
                        "long": "--noheadings"
                    },
                    {
                        "name": "--notruncate",
                        "lines": 2,
                        "long": "--notruncate"
                    },
                    {
                        "name": "-o --output",
                        "lines": 3,
                        "flag": "-o",
                        "long": "--output"
                    },
                    {
                        "name": "--output-all",
                        "lines": 2,
                        "long": "--output-all"
                    },
                    {
                        "name": "-p --pwd",
                        "lines": 2,
                        "flag": "-p",
                        "long": "--pwd"
                    },
                    {
                        "name": "-r --raw",
                        "lines": 2,
                        "flag": "-r",
                        "long": "--raw"
                    },
                    {
                        "name": "-s --system-accs",
                        "lines": 9,
                        "flag": "-s",
                        "long": "--system-accs"
                    },
                    {
                        "name": "-u --user-accs",
                        "lines": 4,
                        "flag": "-u",
                        "long": "--user-accs"
                    },
                    {
                        "name": "-V --version",
                        "lines": 8,
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-Z --context",
                        "lines": 2,
                        "flag": "-Z",
                        "long": "--context"
                    },
                    {
                        "name": "-z --print0",
                        "lines": 2,
                        "flag": "-z",
                        "long": "--print0"
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "lslogins - display information about known users in the system\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "lslogins [options] [-s|-u[=UID]] [-g groups] [-l logins] [username]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Examine the wtmp and btmp logs, /etc/shadow (if necessary) and /passwd and output the desired\ndata.\n\nThe optional argument username forces lslogins to print all available details about the\nspecified user only. In this case the output format is different than in case of -l or -g and\nunknown is username reported as an error.\n\nThe default action is to list info about all the users in the system.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "Mandatory arguments to long options are mandatory for short options too.\n",
                "subsections": [
                    {
                        "name": "-a --acc-expiration",
                        "content": "Display data about the date of last password change and the account expiration date (see\nshadow(5) for more info). (Requires root privileges.)\n\n--btmp-file path\nAlternate path for btmp.\n",
                        "flag": "-a",
                        "long": "--acc-expiration"
                    },
                    {
                        "name": "-c --colon-separate",
                        "content": "Separate info about each user with a colon instead of a newline.\n",
                        "flag": "-c",
                        "long": "--colon-separate"
                    },
                    {
                        "name": "-e --export",
                        "content": "Output data in the format of NAME=VALUE.\n",
                        "flag": "-e",
                        "long": "--export"
                    },
                    {
                        "name": "-f --failed",
                        "content": "Display data about the users' last failed login attempts.\n",
                        "flag": "-f",
                        "long": "--failed"
                    },
                    {
                        "name": "-G --supp-groups",
                        "content": "Show information about supplementary groups.\n",
                        "flag": "-G",
                        "long": "--supp-groups"
                    },
                    {
                        "name": "-g --groups",
                        "content": "Only show data of users belonging to groups. More than one group may be specified; the\nlist has to be comma-separated. Unknown group names are ignored.\n\nNote that relation between user and group may be invisible for primary group if the user\nis not explicitly specify as group member (e.g., in /etc/group). If the command lslogins\nscans for groups than it uses groups database only, and user database with primary GID is\nnot used at all.\n",
                        "flag": "-g",
                        "long": "--groups"
                    },
                    {
                        "name": "-h --help",
                        "content": "Display help information and exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-L --last",
                        "content": "Display data containing information about the users' last login sessions.\n",
                        "flag": "-L",
                        "long": "--last"
                    },
                    {
                        "name": "-l --logins",
                        "content": "Only show data of users with a login specified in logins (user names or user IDS). More\nthan one login may be specified; the list has to be comma-separated. Unknown login names\nare ignored.\n",
                        "flag": "-l",
                        "long": "--logins"
                    },
                    {
                        "name": "-n --newline",
                        "content": "Display each piece of information on a separate line.\n",
                        "flag": "-n",
                        "long": "--newline"
                    },
                    {
                        "name": "--noheadings",
                        "content": "Do not print a header line.\n",
                        "long": "--noheadings"
                    },
                    {
                        "name": "--notruncate",
                        "content": "Don’t truncate output.\n",
                        "long": "--notruncate"
                    },
                    {
                        "name": "-o --output",
                        "content": "Specify which output columns to print. The default list of columns may be extended if\nlist is specified in the format +list.\n",
                        "flag": "-o",
                        "long": "--output"
                    },
                    {
                        "name": "--output-all",
                        "content": "Output all available columns. --help to get a list of all supported columns.\n",
                        "long": "--output-all"
                    },
                    {
                        "name": "-p --pwd",
                        "content": "Display information related to login by password (see also -afL).\n",
                        "flag": "-p",
                        "long": "--pwd"
                    },
                    {
                        "name": "-r --raw",
                        "content": "Raw output (no columnation).\n",
                        "flag": "-r",
                        "long": "--raw"
                    },
                    {
                        "name": "-s --system-accs",
                        "content": "Show system accounts. These are by default all accounts with a UID between 101 and 999\n(inclusive), with the exception of either nobody or nfsnobody (UID 65534). This hardcoded\ndefault may be overwritten by parameters SYSUIDMIN and SYSUIDMAX in the file\n/etc/login.defs.\n\n--time-format type\nDisplay dates in short, full or iso format. The default is short, this time format is\ndesigned to be space efficient and human readable.\n",
                        "flag": "-s",
                        "long": "--system-accs"
                    },
                    {
                        "name": "-u --user-accs",
                        "content": "Show user accounts. These are by default all accounts with UID above 1000 (inclusive),\nwith the exception of either nobody or nfsnobody (UID 65534). This hardcoded default\nmaybe overwritten by parameters UIDMIN and UIDMAX in the file /etc/login.defs.\n",
                        "flag": "-u",
                        "long": "--user-accs"
                    },
                    {
                        "name": "-V --version",
                        "content": "Display version information and exit.\n\n--wtmp-file path\nAlternate path for wtmp.\n\n--lastlog path\nAlternate path for lastlog(8).\n",
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-Z --context",
                        "content": "Display the users' security context.\n",
                        "flag": "-Z",
                        "long": "--context"
                    },
                    {
                        "name": "-z --print0",
                        "content": "Delimit user entries with a nul character, instead of a newline.\n",
                        "flag": "-z",
                        "long": "--print0"
                    }
                ]
            },
            "EXIT STATUS": {
                "content": "0\nif OK,\n\n1\nif incorrect arguments specified,\n\n2\nif a serious error occurs (e.g., a corrupt log).\n",
                "subsections": []
            },
            "NOTES": {
                "content": "The default UID thresholds are read from /etc/login.defs.\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "The lslogins utility is inspired by the logins utility, which first appeared in FreeBSD 4.10.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "Ondrej Oprala <ooprala@redhat.com>, Karel Zak <kzak@redhat.com>\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "group(5), passwd(5), shadow(5), utmp(5)\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "For bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.\n",
                "subsections": []
            },
            "AVAILABILITY": {
                "content": "The lslogins command is part of the util-linux package which can be downloaded from Linux\nKernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.\n\n\n\nutil-linux 2.37.2                            2021-06-02                                  LSLOGINS(1)",
                "subsections": []
            }
        }
    }
}