genhomedircon - Linux


genhomedircon is a utility that creates home directory configuration files in a consistent and secure manner. It ensures proper UID and GID ownership, permissions, and sets appropriate access control lists (ACLs) for shared directories.


genhomedircon [-f CONFIG_PATH] [-g GROUP_ID] [-o OWNER_ID] [-p PASSWD_FILE] [-v]


  • -f CONFIG_PATH: Specify a custom configuration path for ACL definitions.
  • -g GROUP_ID: Set the default group ID for home directories.
  • -o OWNER_ID: Set the default user ID for home directories.
  • -p PASSWD_FILE: Read user and group information from the specified password file (default: /etc/passwd).
  • -v: Enable verbose output for debugging.


Create home directories for users "user1" and "user2" from a custom configuration file:

genhomedircon -f /my/config.ini user1 user2

Create home directories for all users in /etc/passwd:


Set the default group ID to "users" and verbose output:

genhomedircon -g users -v

Common Issues

  • Error: "User not found": The specified user does not exist in the password file.
  • Error: "Permission denied": Insufficient permissions to create home directories.
  • Home directory already exists: The command will not create duplicate directories.


  • Integration with LDAP: Use genhomedircon in scripts to automate home directory creation based on LDAP user information.
  • Integration with bash: Create a custom function to generate home directories using genhomedircon.

Related Commands

  • useradd: Creates user accounts.
  • groupadd: Creates group accounts.
  • chown: Changes file or directory ownership.
  • chmod: Changes file or directory permissions.
  • acl: Manages Access Control Lists.