{
    "content": [
        {
            "type": "text",
            "text": "# systemd-sysusers(8) (man)\n\n**Summary:** systemd-sysusers, systemd-sysusers.service - Allocate system users and groups\n\n**Synopsis:** systemd-sysusers [OPTIONS...] [CONFIGFILE...]\nsystemd-sysusers.service\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | --inline | — | Treat each positional argument as a separate configuration line instead of a file name. |\n| — | --cat-config | — | Copy the contents of config files to standard output. Before each file, the filename is printed as a comment. |\n| — | --no-pager | — | Do not pipe output into a pager. |\n| -h | --help | — | Print a short help text and exit. |\n| — | --version | — | Print a short version string and exit. |\n\n## See Also\n\n- systemd(1)\n- sysusers.d(5)\n- systemd.exec(1)\n- mkpasswd(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (4 lines)\n- **DESCRIPTION** (12 lines)\n- **OPTIONS** (37 lines) — 5 subsections\n  - --inline (2 lines)\n  - --cat-config (3 lines)\n  - --no-pager (2 lines)\n  - -h --help (2 lines)\n  - --version (2 lines)\n- **CREDENTIALS** (37 lines)\n- **EXIT STATUS** (2 lines)\n- **SEE ALSO** (3 lines)\n- **NOTES** (9 lines)\n\n## Full Content\n\n### NAME\n\nsystemd-sysusers, systemd-sysusers.service - Allocate system users and groups\n\n### SYNOPSIS\n\nsystemd-sysusers [OPTIONS...] [CONFIGFILE...]\n\nsystemd-sysusers.service\n\n### DESCRIPTION\n\nsystemd-sysusers creates system users and groups, based on the file format and location\nspecified in sysusers.d(5).\n\nIf invoked with no arguments, it applies all directives from all files found in the\ndirectories specified by sysusers.d(5). When invoked with positional arguments, if option\n--replace=PATH is specified, arguments specified on the command line are used instead of the\nconfiguration file PATH. Otherwise, just the configuration specified by the command line\narguments is executed. The string \"-\" may be specified instead of a filename to instruct\nsystemd-sysusers to read the configuration from standard input. If only the basename of a\nfile is specified, all configuration directories are searched for a matching file and the\nfile found that has the highest priority is executed.\n\n### OPTIONS\n\nThe following options are understood:\n\n--root=root\nTakes a directory path as an argument. All paths will be prefixed with the given\nalternate root path, including config search paths.\n\n--image=image\nTakes a path to a disk image file or block device node. If specified all operations are\napplied to file system in the indicated disk image. This is similar to --root= but\noperates on file systems stored in disk images or block devices. The disk image should\neither contain just a file system or a set of file systems within a GPT partition table,\nfollowing the Discoverable Partitions Specification[1]. For further information on\nsupported disk images, see systemd-nspawn(1)'s switch of the same name.\n\n--replace=PATH\nWhen this option is given, one ore more positional arguments must be specified. All\nconfiguration files found in the directories listed in sysusers.d(5) will be read, and\nthe configuration given on the command line will be handled instead of and with the same\npriority as the configuration file PATH.\n\nThis option is intended to be used when package installation scripts are running and\nfiles belonging to that package are not yet available on disk, so their contents must be\ngiven on the command line, but the admin configuration might already exist and should be\ngiven higher priority.\n\nExample 1. RPM installation script for radvd\n\necho 'u radvd - \"radvd daemon\"' | \\\nsystemd-sysusers --replace=/usr/lib/sysusers.d/radvd.conf -\n\nThis will create the radvd user as if /usr/lib/sysusers.d/radvd.conf was already on disk.\nAn admin might override the configuration specified on the command line by placing\n/etc/sysusers.d/radvd.conf or even /etc/sysusers.d/00-overrides.conf.\n\nNote that this is the expanded form, and when used in a package, this would be written\nusing a macro with \"radvd\" and a file containing the configuration line as arguments.\n\n#### --inline\n\nTreat each positional argument as a separate configuration line instead of a file name.\n\n#### --cat-config\n\nCopy the contents of config files to standard output. Before each file, the filename is\nprinted as a comment.\n\n#### --no-pager\n\nDo not pipe output into a pager.\n\n#### -h --help\n\nPrint a short help text and exit.\n\n#### --version\n\nPrint a short version string and exit.\n\n### CREDENTIALS\n\nsystemd-sysusers supports the service credentials logic as implemented by\nLoadCredential=/SetCredential= (see systemd.exec(1) for details). The following credentials\nare used when passed in:\n\n\"passwd.hashed-password.user\"\nA UNIX hashed password string to use for the specified user, when creating an entry for\nit. This is particularly useful for the \"root\" user as it allows provisioning the default\nroot password to use via a unit file drop-in or from a container manager passing in this\ncredential. Note that setting this credential has no effect if the specified user account\nalready exists. This credential is hence primarily useful in first boot scenarios or\nsystems that are fully stateless and come up with an empty /etc/ on every boot.\n\n\"passwd.plaintext-password.user\"\nSimilar to \"passwd.hashed-password.user\" but expect a literal, plaintext password, which\nis then automatically hashed before used for the user account. If both the hashed and the\nplaintext credential are specified for the same user the former takes precedence. It's\ngenerally recommended to specify the hashed version; however in test environments with\nweaker requirements on security it might be easier to pass passwords in plaintext\ninstead.\n\n\"passwd.shell.user\"\nSpecifies the shell binary to use for the specified account when creating it.\n\nNote that by default the systemd-sysusers.service unit file is set up to inherit the\n\"passwd.hashed-password.root\", \"passwd.plaintext-password.root\" and \"passwd.shell.root\"\ncredentials from the service manager. Thus, when invoking a container with an unpopulated\n/etc/ for the first time it is possible to configure the root user's password to be \"systemd\"\nlike this:\n\n# systemd-nspawn --image=... --set-credential=password.hashed-password.root:'$y$j9T$yAuRJu1o5HioZAGDYPU5d.$F64ni6J2y2nNQve90M/p0ZP0ECP/qqzipNyaY9fjGpC' ...\n\nNote again that the data specified in these credentials is consulted only when creating an\naccount for the first time, it may not be used for changing the password or shell of an\naccount that already exists.\n\nUse mkpasswd(1) for generating UNIX password hashes from the command line.\n\n### EXIT STATUS\n\nOn success, 0 is returned, a non-zero failure code otherwise.\n\n### SEE ALSO\n\nsystemd(1), sysusers.d(5), Users, Groups, UIDs and GIDs on systemd systems[2],\nsystemd.exec(1), mkpasswd(1)\n\n### NOTES\n\n1. Discoverable Partitions Specification\nhttps://systemd.io/DISCOVERABLEPARTITIONS\n\n2. Users, Groups, UIDs and GIDs on systemd systems\nhttps://systemd.io/UIDS-GIDS\n\n\n\nsystemd 249                                                                      SYSTEMD-SYSUSERS(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "systemd-sysusers",
        "section": "8",
        "mode": "man",
        "summary": "systemd-sysusers, systemd-sysusers.service - Allocate system users and groups",
        "synopsis": "systemd-sysusers [OPTIONS...] [CONFIGFILE...]\nsystemd-sysusers.service",
        "flags": [
            {
                "flag": "",
                "long": "--inline",
                "arg": null,
                "description": "Treat each positional argument as a separate configuration line instead of a file name."
            },
            {
                "flag": "",
                "long": "--cat-config",
                "arg": null,
                "description": "Copy the contents of config files to standard output. Before each file, the filename is printed as a comment."
            },
            {
                "flag": "",
                "long": "--no-pager",
                "arg": null,
                "description": "Do not pipe output into a pager."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Print a short help text and exit."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Print a short version string and exit."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "systemd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
            },
            {
                "name": "sysusers.d",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/sysusers.d/5/json"
            },
            {
                "name": "systemd.exec",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.exec/1/json"
            },
            {
                "name": "mkpasswd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/mkpasswd/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 37,
                "subsections": [
                    {
                        "name": "--inline",
                        "lines": 2,
                        "long": "--inline"
                    },
                    {
                        "name": "--cat-config",
                        "lines": 3,
                        "long": "--cat-config"
                    },
                    {
                        "name": "--no-pager",
                        "lines": 2,
                        "long": "--no-pager"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "CREDENTIALS",
                "lines": 37,
                "subsections": []
            },
            {
                "name": "EXIT STATUS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 9,
                "subsections": []
            }
        ]
    }
}