{
    "content": [
        {
            "type": "text",
            "text": "# sulogin (man)\n\n## NAME\n\nsulogin - single-user login\n\n## SYNOPSIS\n\nsulogin [options] [tty]\n\n## DESCRIPTION\n\nsulogin is invoked by init when the system goes into single-user mode.\n\n## TLDR\n\n> Log in as root during single-user mode.\n\n- Start `sulogin` on the default console:\n  `sudo sulogin`\n- Start `sulogin` on a specific TTY device:\n  `sudo sulogin {{/dev/ttyX}}`\n- Set a maximum timeout(in seconds) for entering the root password before continuing normal boot:\n  `sudo sulogin {{-t|--timeout}} {{timeout}}`\n- Start root's shell as a login shell:\n  `sudo sulogin {{-p|--login-shell}}`\n- Force a root shell without asking for a password when default methods of obtaining the password fail:\n  `sudo sulogin {{-e|--force}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (5 subsections)\n- **ENVIRONMENT**\n- **AUTHORS**\n- **REPORTING BUGS**\n- **AVAILABILITY**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "sulogin",
        "section": "",
        "mode": "man",
        "summary": "sulogin - single-user login",
        "synopsis": "sulogin [options] [tty]",
        "tldr_summary": "Log in as root during single-user mode.",
        "tldr_examples": [
            {
                "description": "Start `sulogin` on the default console",
                "command": "sudo sulogin"
            },
            {
                "description": "Start `sulogin` on a specific TTY device",
                "command": "sudo sulogin {{/dev/ttyX}}"
            },
            {
                "description": "Set a maximum timeout(in seconds) for entering the root password before continuing normal boot",
                "command": "sudo sulogin {{-t|--timeout}} {{timeout}}"
            },
            {
                "description": "Start root's shell as a login shell",
                "command": "sudo sulogin {{-p|--login-shell}}"
            },
            {
                "description": "Force a root shell without asking for a password when default methods of obtaining the password fail",
                "command": "sudo sulogin {{-e|--force}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-e",
                "long": "--force",
                "arg": null,
                "description": "If the default method of obtaining the root password from the system via getpwnam(3) fails, then examine /etc/passwd and /etc/shadow to get the password. If these files are damaged or nonexistent, or when root account is locked by '!' or '*' at the begin of the password then sulogin will start a root shell without asking for a password. Only use the -e option if you are sure the console is physically protected against unauthorized access."
            },
            {
                "flag": "-p",
                "long": "--login-shell",
                "arg": null,
                "description": "Specifying this option causes sulogin to start the shell process as a login shell."
            },
            {
                "flag": "-t",
                "long": "--timeout",
                "arg": null,
                "description": "Specify the maximum amount of time to wait for user input. By default, sulogin will wait forever."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help text and exit."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Display version information and exit."
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-e --force",
                        "lines": 8,
                        "flag": "-e",
                        "long": "--force"
                    },
                    {
                        "name": "-p --login-shell",
                        "lines": 2,
                        "flag": "-p",
                        "long": "--login-shell"
                    },
                    {
                        "name": "-t --timeout",
                        "lines": 3,
                        "flag": "-t",
                        "long": "--timeout"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "sulogin - single-user login\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "sulogin [options] [tty]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "sulogin is invoked by init when the system goes into single-user mode.\n\nThe user is prompted:\n\nGive root password for system maintenance (or type Control-D for normal startup):\n\nIf the root account is locked and --force is specified, no password is required.\n\nsulogin will be connected to the current terminal, or to the optional tty device that can be\nspecified on the command line (typically /dev/console).\n\nWhen the user exits from the single-user shell, or presses control-D at the prompt, the\nsystem will continue to boot.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-e --force",
                        "content": "If the default method of obtaining the root password from the system via getpwnam(3)\nfails, then examine /etc/passwd and /etc/shadow to get the password. If these files are\ndamaged or nonexistent, or when root account is locked by '!' or '*' at the begin of the\npassword then sulogin will start a root shell without asking for a password.\n\nOnly use the -e option if you are sure the console is physically protected against\nunauthorized access.\n",
                        "flag": "-e",
                        "long": "--force"
                    },
                    {
                        "name": "-p --login-shell",
                        "content": "Specifying this option causes sulogin to start the shell process as a login shell.\n",
                        "flag": "-p",
                        "long": "--login-shell"
                    },
                    {
                        "name": "-t --timeout",
                        "content": "Specify the maximum amount of time to wait for user input. By default, sulogin will wait\nforever.\n",
                        "flag": "-t",
                        "long": "--timeout"
                    },
                    {
                        "name": "-h --help",
                        "content": "Display help text and exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "content": "Display version information and exit.\n",
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            "ENVIRONMENT": {
                "content": "sulogin looks for the environment variable SUSHELL or sushell to determine what shell to\nstart. If the environment variable is not set, it will try to execute root’s shell from\n/etc/passwd. If that fails, it will fall back to /bin/sh.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "sulogin was written by Miquel van Smoorenburg for sysvinit and later ported to util-linux by\nDave Reisner and Karel Zak.\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 sulogin 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                                   SULOGIN(8)",
                "subsections": []
            }
        }
    }
}