← 返回命令列表

Linux command

mkhomedir_helper 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Example

sudo mkhomedir_helper [username]

Example

sudo mkhomedir_helper [username] [037]

Example

sudo mkhomedir_helper [username] [umask] [path/to/skeleton_directory]

Example

sudo mkhomedir_helper [username] [umask] [/etc/skel] [0700]

说明

mkhomedir_helper is a helper program for the pam_mkhomedir PAM module. It creates home directories and populates them with the contents of the specified skeleton directory. The tool copies files from the skeleton directory (typically /etc/skel) to the new home directory, applying the specified umask to file permissions. It sets ownership to the target user and creates standard configuration files like .bashrc and .profile. The helper is architecturally separated from the PAM module for security reasons, allowing SELinux domain transitions during execution and preventing direct access from login domains to home directory contents.

参数

user
Username for which to create the home directory
umask
File creation mask for contents; default is 0022
path-to-skel
Skeleton directory to copy contents from; default is /etc/skel
home_mode
Permissions for the home directory itself; computed from umask if not specified
path-to-vendor-skel
Secondary skeleton directory; when set, home directory is populated from path-to-skel first, then from this directory

FAQ

What is the mkhomedir_helper command used for?

mkhomedir_helper is a helper program for the pam_mkhomedir PAM module. It creates home directories and populates them with the contents of the specified skeleton directory. The tool copies files from the skeleton directory (typically /etc/skel) to the new home directory, applying the specified umask to file permissions. It sets ownership to the target user and creates standard configuration files like .bashrc and .profile. The helper is architecturally separated from the PAM module for security reasons, allowing SELinux domain transitions during execution and preventing direct access from login domains to home directory contents.

How do I run a basic mkhomedir_helper example?

Run `sudo mkhomedir_helper [username]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does user do in mkhomedir_helper?

Username for which to create the home directory