{
    "content": [
        {
            "type": "text",
            "text": "# lslogins (info)\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\nand output the desired data.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (18 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": "info",
        "summary": "lslogins - display information about known users in the system",
        "synopsis": "lslogins [options] [-s|-u[=UID]] [-g groups] [-l logins] [username]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "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. -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 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. -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."
            },
            {
                "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. -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."
            },
            {
                "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": 10,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "-a, --acc-expiration",
                        "lines": 7,
                        "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": 13,
                        "flag": "-G",
                        "long": "--supp-groups"
                    },
                    {
                        "name": "-h, --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-L, --last",
                        "lines": 8,
                        "flag": "-L",
                        "long": "--last"
                    },
                    {
                        "name": "-n, --newline",
                        "lines": 2,
                        "flag": "-n",
                        "long": "--newline"
                    },
                    {
                        "name": "--noheadings",
                        "lines": 2,
                        "long": "--noheadings"
                    },
                    {
                        "name": "--notruncate",
                        "lines": 6,
                        "long": "--notruncate"
                    },
                    {
                        "name": "--output-all",
                        "lines": 3,
                        "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": 11,
                        "flag": "-s",
                        "long": "--system-accs"
                    },
                    {
                        "name": "-u, --user-accs",
                        "lines": 5,
                        "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": 3,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 5,
                "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\nand output the desired data.\n\nThe optional argument username forces lslogins to print all available\ndetails about the specified user only. In this case the output format\nis different than in case of -l or -g and unknown is username reported\nas 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\ntoo.\n",
                "subsections": [
                    {
                        "name": "-a, --acc-expiration",
                        "content": "Display data about the date of last password change and the account\nexpiration date (see shadow(5) for more info). (Requires root\nprivileges.)\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\n-g, --groups=groups\nOnly show data of users belonging to groups. More than one group\nmay be specified; the list has to be comma-separated. Unknown group\nnames are ignored.\n\nNote that relation between user and group may be invisible for\nprimary group if the user is not explicitly specify as group member\n(e.g., in /etc/group). If the command lslogins scans for groups\nthan it uses groups database only, and user database with primary\nGID is not used at all.\n",
                        "flag": "-G",
                        "long": "--supp-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\nsessions.\n\n-l, --logins=logins\nOnly show data of users with a login specified in logins (user\nnames or user IDS). More than one login may be specified; the list\nhas to be comma-separated. Unknown login names are ignored.\n",
                        "flag": "-L",
                        "long": "--last"
                    },
                    {
                        "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\n-o, --output list\nSpecify which output columns to print. The default list of columns\nmay be extended if list is specified in the format +list.\n",
                        "long": "--notruncate"
                    },
                    {
                        "name": "--output-all",
                        "content": "Output all available columns. --help to get a list of all supported\ncolumns.\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\nbetween 101 and 999 (inclusive), with the exception of either\nnobody or nfsnobody (UID 65534). This hardcoded default may be\noverwritten 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,\nthis time format is designed to be space efficient and human\nreadable.\n",
                        "flag": "-s",
                        "long": "--system-accs"
                    },
                    {
                        "name": "-u, --user-accs",
                        "content": "Show user accounts. These are by default all accounts with UID\nabove 1000 (inclusive), with the exception of either nobody or\nnfsnobody (UID 65534). This hardcoded default maybe overwritten by\nparameters 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\nappeared 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\nhttps://github.com/karelzak/util-linux/issues.\n",
                "subsections": []
            },
            "AVAILABILITY": {
                "content": "The lslogins command is part of the util-linux package which can be\ndownloaded from Linux Kernel Archive\n<https://www.kernel.org/pub/linux/utils/util-linux/>.\n\nutil-linux 2.37.2                 2021-06-02                       LSLOGINS(1)",
                "subsections": []
            }
        }
    }
}