Purge User Home Directories

The Home Directory Purging service module can archive, delete, and later delete archives of the home directories of users set to be purgeable in LDAP.

LDAP Schema

We created a purgeableAccount schema in the Three Rings Enterprise OID space to keep track of the date and time at which an LDAP user's home directory should be archived and deleted. The needed schema can be found in schema/ooo.schema and schema/ooopa.schema in the Splat distribution. These define a new object class purgeableAccount and a new optional attribute pendingPurge. The Home Directory Purging module utilizes the pendingPurge attribute to determine account purgability.

attributetype ( oooPAAttributes:1 NAME 'pendingPurge'
        DESC 'Timestamp of pending deletion date'
        EQUALITY generalizedTimeMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE )

objectclass ( oooPAClasses:1 NAME 'purgeableAccount'
        DESC 'Purgeable Account'
        SUP top AUXILIARY
        MAY ( pendingPurge ) )
        

Home Directory Purging Service Options

The Home Directory Purging module supports the following options. The home, minuid , and mingid options are not required to be set, but are useful for sanity checking.

home

Only home directories that are subdirectories of the specified directory may be purged and/or archived.

minuid

Do not purge/archive home directories for uids lower than minuid.

mingid

Do not purge/archive home directories for gids lower than mingid.

archivehomedir

Set to true to archive a user's home directory before purging it. Defaults to true.

purgehomedir

Set to true to purge a user's home directory after the pendingPurge time in the user's LDAP entry. Defaults to true. N.B. if this option and archivehomedir are both set to false, the plugin will do nothing.

purgehomearchive

Set to true to delete the archive created of a user's home directory. This action will take place purgearchivewait days after the archive was last modified (which will generally be when the archive was created). Defaults to true.

archivedest

Directory that homedir archives will be created and left in. Defaults to /home.

purgearchivewait

Number of days since its last modified time to wait before deleting a homedir archive. Defaults to 14.