LinuxCommandLibrary

mkhomedir_helper

Helper binary that creates home directories

TLDR

Create a home directory for a user based on /etc/skel with umask 022

$ sudo mkhomedir_helper [username]
copy


Create a home directory for a user based on /etc/skel with all permissions for owner (0) and read permission for group (3)
$ sudo mkhomedir_helper [username] [037]
copy


Create a home directory for a user based on a custom skeleton
$ sudo mkhomedir_helper [username] [umask] [path/to/skeleton_directory]
copy

SYNOPSIS

mkhomedir_helper {user} [umask [ path-to-skel [ home_mode ] ]]

DESCRIPTION

mkhomedir_helper is a helper program for the pam_mkhomedir module that creates home directories and populates them with contents of the specified skel directory.

The default value of umask is 0022 and the default value of path-to-skel is /etc/skel. The default value of home_mode is computed from the value of umask.

The helper is separated from the module to not require direct access from login SELinux domains to the contents of user home directories. The SELinux domain transition happens when the module is executing the mkhomedir_helper.

The helper never touches home directories if they already exist.

SEE ALSO

pam_mkhomedir(8)

AUTHOR

Written by Tomas Mraz based on the code originally in pam_mkhomedir module.

Copied to clipboard