{
    "mode": "man",
    "parameter": "pwconv",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/pwconv/8/json",
    "generated": "2026-06-12T13:47:14Z",
    "synopsis": "pwconv [options]\npwunconv [options]\ngrpconv [options]\ngrpunconv [options]",
    "sections": {
        "NAME": {
            "content": "pwconv, pwunconv, grpconv, grpunconv - convert to and from shadow passwords and groups\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pwconv [options]\n\npwunconv [options]\n\ngrpconv [options]\n\ngrpunconv [options]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The pwconv command creates shadow from passwd and an optionally existing shadow.\n\nThe pwunconv command creates passwd from passwd and shadow and then removes shadow.\n\nThe grpconv command creates gshadow from group and an optionally existing gshadow.\n\nThe grpunconv command creates group from group and gshadow and then removes gshadow.\n\nThese four programs all operate on the normal and shadow password and group files:\n/etc/passwd, /etc/group, /etc/shadow, and /etc/gshadow.\n\nEach program acquires the necessary locks before conversion.  pwconv and grpconv are similar.\nFirst, entries in the shadowed file which don't exist in the main file are removed. Then,\nshadowed entries which don't have `x' as the password in the main file are updated. Any\nmissing shadowed entries are added. Finally, passwords in the main file are replaced with\n`x'. These programs can be used for initial conversion as well to update the shadowed file if\nthe main file is edited by hand.\n\npwconv will use the values of PASSMINDAYS, PASSMAXDAYS, and PASSWARNAGE from\n/etc/login.defs when adding new entries to /etc/shadow.\n\nLikewise pwunconv and grpunconv are similar. Passwords in the main file are updated from the\nshadowed file. Entries which exist in the main file but not in the shadowed file are left\nalone. Finally, the shadowed file is removed. Some password aging information is lost by\npwunconv. It will convert what it can.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "The options which apply to the pwconv, pwunconv, grpconv, and grpunconv commands are:\n",
            "subsections": [
                {
                    "name": "-h --help",
                    "content": "Display help message and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-R --root",
                    "content": "Apply changes in the CHROOTDIR directory and use the configuration files from the\nCHROOTDIR directory.\n",
                    "flag": "-R",
                    "long": "--root"
                }
            ]
        },
        "BUGS": {
            "content": "Errors in the password or group files (such as invalid or duplicate entries) may cause these\nprograms to loop forever or fail in other strange ways. Please run pwck and grpck to correct\nany such errors before converting to or from shadow passwords or groups.\n",
            "subsections": []
        },
        "CONFIGURATION": {
            "content": "The following configuration variable in /etc/login.defs changes the behavior of grpconv and\ngrpunconv:\n",
            "subsections": [
                {
                    "name": "MAX___MEMBERS___PER___GROUP (number)",
                    "content": "Maximum members per group entry. When the maximum is reached, a new group entry (line) is\nstarted in /etc/group (with the same name, same password, and same GID).\n\nThe default value is 0, meaning that there are no limits in the number of members in a\ngroup.\n\nThis feature (split group) permits to limit the length of lines in the group file. This\nis useful to make sure that lines for NIS groups are not larger than 1024 characters.\n\nIf you need to enforce such limit, you can use 25.\n\nNote: split groups may not be supported by all tools (even in the Shadow toolsuite). You\nshould not use this variable unless you really need it.\n\nThe following configuration variables in /etc/login.defs change the behavior of pwconv:\n"
                },
                {
                    "name": "PASS___MAX___DAYS (number)",
                    "content": "The maximum number of days a password may be used. If the password is older than this, a\npassword change will be forced. If not specified, -1 will be assumed (which disables the\nrestriction).\n"
                },
                {
                    "name": "PASS___MIN___DAYS (number)",
                    "content": "The minimum number of days allowed between password changes. Any password changes\nattempted sooner than this will be rejected. If not specified, -1 will be assumed (which\ndisables the restriction).\n"
                },
                {
                    "name": "PASS___WARN___AGE (number)",
                    "content": "The number of days warning given before a password expires. A zero means warning is given\nonly upon the day of expiration, a negative value means no warning is given. If not\nspecified, no warning will be provided.\n"
                }
            ]
        },
        "FILES": {
            "content": "/etc/login.defs\nShadow password suite configuration.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "grpck(8), login.defs(5), pwck(8).\n\n\n\nshadow-utils 4.8.1                           02/06/2024                                    PWCONV(8)",
            "subsections": []
        }
    },
    "summary": "pwconv, pwunconv, grpconv, grpunconv - convert to and from shadow passwords and groups",
    "flags": [
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Display help message and exit."
        },
        {
            "flag": "-R",
            "long": "--root",
            "arg": null,
            "description": "Apply changes in the CHROOTDIR directory and use the configuration files from the CHROOTDIR directory."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "grpck",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/grpck/8/json"
        },
        {
            "name": "login.defs",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/login.defs/5/json"
        },
        {
            "name": "pwck",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/pwck/8/json"
        }
    ]
}