LDAP Home Connector

Introduction

The LDAP Home Connector app enables you to configure your ownCloud server to display your users’ Windows home directories on the ownCloud Files pages view, just like any other folder.

Typically, Windows home directories are stored on a network server in a root folder, such as Home, which then contains individual folders for each user.

Directory Structure User Home Share
Home
  user_1
  user_2
  ...

The Windows home directory can be published as a share and due to the permissions set, any user can only see his personal home folder.

To integrate a user’s home folder from Windows into ownCloud, the Home share is locally mounted. An LDAP attribute is added to the user’s profile containing the path of the local mount and then used by the LDAP Home Connector to show the user’s home in ownCloud.

ldap home connector diagram

Prerequisites

The following prerequisites are required:

  • Mounting cifs is available on the server where ownCloud is hosted.

  • The LDAP Integration app is enabled and has a working LDAP/Active Directory configuration in ownCloud.

  • The LDAP Home Connector app is enabled.

Configuration

The configuration is done in several steps:

  1. Mount the root Windows home directory to the server hosting ownCloud

  2. Provide this mount as volume to the Docker container

  3. Configure Active Directory/LDAP by adding a LDAP attribute to the user profile

  4. Use the LDAP Home Connector app to connect it to ownCloud

Mount the Home Directory

  • For enhanced security, create a file where the credentials are stored accessing the cifs share in the server hosting ownCloud such as:

    /etc/credentials
  • With the username and password on separate lines, replacing the values according your setup:

    username=winhomeuser
    password=winhomepassword
  • Create an entry in /etc/fstab for the remote Windows root home directory mount and use the credentials file created above, substitute and adapt your parameters and filenames:

    //192.168.1.58/home /mnt/share/users cifs credentials=/etc/credentials,uid=33,gid=33
  • Provide this mount point as volume to the ownCloud container. See the Compose Setup in the installation documentation for a general example for how to do so. To make handling easier, use the same paths for the source and the container.

Configure the LDAP Server

In Active Directory, open the user profile. Scroll to the Extensions section and open the Attribute Editor tab.

Active Directory Attribute editor

Use any LDAP attribute that is not already in use (UserSharedFolder in this instance) and click Edit. Enter the user’s home directory.

Editing the LDAP attribute

If different paths are used, it is important that you use the mounted volume of the container as the path and not the source of the mount. This is because this is the one seen by the ownCloud instance.

Save your changes.

Configure the LDAP Home Connector

  • Enable the LDAP Home Connector app.

  • Go to the LDAP Home Connector form on your ownCloud admin page.
    In the Display folder as: field enter the name as you want it to appear on your users’ File pages.

  • In the Attribute name: field enter the LDAP attribute name from above that contains the home directory and press Save.

LDAP Home Connector configuration

The Windows user’s home directory is now available to the user when they log on in ownCloud.