{
    "mode": "man",
    "parameter": "PAM_MKHOMEDIR",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/PAM_MKHOMEDIR/8/json",
    "generated": "2026-10-06T11:14:26Z",
    "synopsis": "pammkhomedir.so [silent] [debug] [umask=mode] [skel=skeldir]",
    "sections": {
        "NAME": {
            "content": "pammkhomedir - PAM module to create users home directory\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pammkhomedir.so [silent] [debug] [umask=mode] [skel=skeldir]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The pammkhomedir PAM module will create a users home directory if it does not exist when the\nsession begins. This allows users to be present in central database (such as NIS, kerberos or\nLDAP) without using a distributed file system or pre-creating a large number of directories.\nThe skeleton directory (usually /etc/skel/) is used to copy default files and also sets a\numask for the creation.\n\nThe new users home directory will not be removed after logout of the user.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "silent\nDon't print informative messages.\n\ndebug\nTurns on debugging via syslog(3).\n\numask=mask\nThe file mode creation mask is set to mask. The default value of mask is 0022. If this\noption is not specified, then the permissions of created user home directory is set to\nthe value of HOMEMODE configuration item from /etc/login.defs. If there is no such\nconfiguration item then the value is computed from the value of UMASK in the same file.\nIf there is no such configuration option either the default value of 0755 is used for the\nmode.\n\nskel=/path/to/skel/directory\nIndicate an alternative skel directory to override the default /etc/skel.\n",
            "subsections": []
        },
        "MODULE TYPES PROVIDED": {
            "content": "Only the session module type is provided.\n",
            "subsections": []
        },
        "RETURN VALUES": {
            "content": "PAMBUFERR\nMemory buffer error.\n\nPAMPERMDENIED\nNot enough permissions to create the new directory or read the skel directory.\n\nPAMUSERUNKNOWN\nUser not known to the underlying authentication module.\n\nPAMSUCCESS\nEnvironment variables were set.\n",
            "subsections": []
        },
        "FILES": {
            "content": "/etc/skel\nDefault skel directory\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "A sample /etc/pam.d/login file:\n\nauth       requisite   pamsecuretty.so\nauth       sufficient  pamldap.so\nauth       required    pamunix.so\nauth       required    pamnologin.so\naccount    sufficient  pamldap.so\naccount    required    pamunix.so\npassword   required    pamunix.so\nsession    required    pammkhomedir.so skel=/etc/skel/ umask=0022\nsession    required    pamunix.so\nsession    optional    pamlastlog.so\nsession    optional    pammail.so standard\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pam.d(5), pam(7).\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "pammkhomedir was written by Jason Gunthorpe <jgg@debian.org>.\n\nLinux-PAM                                    05/07/2023                             PAMMKHOMEDIR(8)",
            "subsections": []
        }
    },
    "summary": "pammkhomedir - PAM module to create users home directory",
    "flags": [],
    "examples": [
        "A sample /etc/pam.d/login file:",
        "auth       requisite   pamsecuretty.so",
        "auth       sufficient  pamldap.so",
        "auth       required    pamunix.so",
        "auth       required    pamnologin.so",
        "account    sufficient  pamldap.so",
        "account    required    pamunix.so",
        "password   required    pamunix.so",
        "session    required    pammkhomedir.so skel=/etc/skel/ umask=0022",
        "session    required    pamunix.so",
        "session    optional    pamlastlog.so",
        "session    optional    pammail.so standard"
    ],
    "see_also": [
        {
            "name": "pam.d",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pam.d/5/json"
        },
        {
            "name": "pam",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/pam/7/json"
        }
    ]
}