SLAPO-HOMEDIR(5)
π SLAPO-HOMEDIR(5) β the home directory provisioning overlay π
okay bestie, so this is a page from the File Formats Manual and it's literally all about slapo-homedir, the overlay that gives your LDAP users actual homes on actual disks. no cap. let's get into it π β¨
πΈ NAME πΈ
slapo-homedir β the Home directory provisioning overlay. it does exactly what it says on the tin and it does it slayfully π
π¦ SYNOPSIS π¦
/etc/openldap/slapd.conf
β¨ DESCRIPTION β¨
so the homedir overlay makes slapd(8) notice when stuff happens to RFC-2307bis style user-objects, and then it goes and makes the appropriate changes on the local filesystem. yes, actually on the disk. like, real directories. iconic behaviour honestly π«Ά
and the best part? this can happen on both master and replica systems, no changes needed. so you can do remote home directory provisioning. your users get homes from across the network and nobody has to ssh in and mkdir like a peasant π
π CONFIGURATION π
Both slapd.conf style and back-config style configuration are supported. pick your fighter, both are valid, both ate π
overlay homedirβ this directive adds the homedir overlay to the current database, or to the frontend if you use it before any database instantiation. seeslapd.conf(5)for the details, bestie.homedir-skeleton-path <pathname>olcSkeletonPath: pathnameβ these options set the path to the skeleton account directory. (generally/etc/skel.) whatever files live in this directory get copied into newly created home directories. the copying is recursive and handles symlinks and fifos, but it will skip most specials. soz to the specials πhomedir-min-uidnumber <user id number>olcMinimumUidNumber: numberβ these options configure the minimum userid to use in any home directory attempt. it's a basic safety measure, a little vibe check, to prevent accidentally using system accounts. see REPLICATION below for more flexible options for selecting accounts πhomedir-regexp <regexp> <path>olcHomedirRegexp: regexp pathβ these options configure a set of regular expressions used for matching, and optionally remapping, incominghomeDirectoryattribute values to pathnames on the local filesystem.$numberexpansion is supported so you can access values captured in parentheses β¨
for example, to accept any directory starting with home and use it verbatim on the local filesystem:
homedir-regexp ^(/home/[-_/a-z0-9]+)$ $1
and to match that same set of directories but create them instead under exporthome, as is popular on Solaris NFS servers:
homedir-regexp ^(/home/[-_/a-z0-9]+)$ /export$1
homedir-delete-style styleolcHomedirDeleteStyle: styleβ these options configure how deletes ofposixAccountentries or their attributes are handled. valid styles areIGNORE, which does nothing, andDELETE, which immediately performs a recursive delete on the home directory, andARCHIVE, which archives the home directory contents in a TAR file for later examination. the default isIGNORE. use with caution, fr fr. and heads up:ARCHIVErequireshomedir-archive-pathto be set β if it isn't, it just functions similar toIGNOREπhomedir-archive-path <pathname>olcHomedirArchivePath: pathnameβ these options specify the destination path for TAR files created by theARCHIVEdelete style π¦
bestie you literally cannot skim the delete styles. DELETE will recursively nuke a home directory off the disk. read it. twice. π
π REPLICATION π
the homedir overlay can operate on either master or replica systems with no changes. see slapd.conf(5) or slapd-config(5) for more information on how to configure syncrepl π¦
partial replication (e.g. with filters) is especially useful for providing different provisioning options to different sets of users. so you can serve different flavours to different friend groups, which is honestly main character energy π
π§ EXAMPLE π§
the following LDIF could be used to add this overlay to cn=config (adjust to suit):
dn: cn=module{0},cn=config
changetype: modify
add: olcModuleLoad
olcModuleLoad: homedir
dn: olcOverlay=homedir,olcDatabase={1}mdb,cn=config
changetype: add
objectClass: olcOverlayConfig
objectClass: olcHomedirConfig
olcOverlay: homedir
olcSkeletonPath: /etc/skel
olcMinimumUidNumber: 1000
olcHomedirRegexp: ^(/home/[-_/a-z0-9]+)$ /export/$1
olcHomedirDeleteStyle: ARCHIVE
olcHomedirArchivePath: /archive
π BUGS π
okay this is the part where we hold hands and pay attention π«Ά
DELETE,MOD, andMODRDNoperations that remove the unix attributes when delete style is set toDELETEwill recursively delete the (regex modified) home directory from the disk. please be careful when deleting or changing values. like, please.MODandMODRDNwill correctly respond tohomeDirectorychanges and perform a non-destructiverename()operation on the filesystem β but this does not correctly retry with a recursive copy when moving between filesystems. fumbled, honestly π- the recursive copy/delete/chown/tar functions are not aware of ACLs, extended attributes, forks, sparse files, or hard links. block and character device archival is non-portable, but should not be an issue in home directories, hopefully π
- copying and archiving may not support files larger than 2GiB on some architectures. bare POSIX UStar archives cannot support internal files larger than 8GiB. the current tar generator does not attempt to resolve uid/gid into symbolic names.
- no attempt is made to try to
mkdir()the parent directories needed for a given home directory or archive path. it's giving "figure it out yourself" π
π FILES π
/etc/openldap/slapd.confβ defaultslapdconfiguration file/etc/skel(or similar) β source of new homedir files.
β SEE ALSO β
slapd.conf(5), slapd-config(5), slapd(8), RFC-2307, RFC-2307bis.
π ACKNOWLEDGEMENTS π
this module was written in 2009 by Emily Backes for Symas Corporation. an absolute legend, we stan forever π
and that's the whole page bestie!! π this was OpenLDAP version 2.7.2, dated 2026/10/21, and you read it all the way through, which means you're genuinely that girl. go provision some home directories (carefully!!) π
β¨π¦
π¦ where this page comes from
- arch rolling: openldap 2.7.2-2 Β· OLDAP-2.8
- Copyright 1998-2026 The OpenLDAP Foundation, All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms