AlexNogard: IT HowTo

Linux & Opensource : Monitoring : Centreon, Nagios, Owncloud ..

By

OwnCloud 4.5.4 : Windows Server Active Directory Authentication.

logo Owncloud 4.5.4

After the previous article Owncloud 4: Introduction, Installation & configuration on CentOS 6.2 , I will now teach you how to make work Owncloud & Active Directory together

Regarding all the comments found on the internet, most people think this operation is quite difficult. I’ll prove that is easier you think

Here is how to :

Before we start, we will install the prerequisites on our Owncloud server, php-ldap:

# yum install php-ldap
# service httpd restart

Then activate our Owncloud Apps “user and group LDAP backend” :

LDAP user and group backend
Our application “Ldap user and group backend” is now activated

Then we go to our Windows Server Active Directory:

I created an OU in my Active Directory : “OwncloudAccess” where I put my users and a group: “OwncloudGroup”.
My “Owncloudgroup” contain all the OU users

Why? so that when the connection is initiated between Owncloud & Active Directory, users will be assigned to the group: OwncloudGroup.
I also created a User OwncloudAdmin, which will be the connector between Owncloud & Active Directory (you can give any name). :

Owncloud Active DirectoryThe OU, the users as well as my group OwncloudGroup
active directory owncloudOwncloudGroup group with users members

To summarize:
SERVER: maindc
DC: fr.alexnogard.com
OR: OwncloudAccess
CN: OwncloudGroup
User “connector” OwncloudAdmin

Once this is done, we are going to configure Owncloud, go to “Admin”, we will use the summary to fulfill our fields:

LDAP Basic :
Host : maindc.fr.alexnogard.com (server+DC).
Base DN : dc=fr,dc=alexnogard,dc=com (our DC organization).
User DN : cn=OwncloudAdmin,ou=OwncloudAccess,dc=fr,dc=alexnogard,dc=com (our “connector” user and its location, here our “OwncloudAccess” OU, located in our fr. alexnogard.com DC).
Password : the user’s password
User Login Filter : sAMAccountName=%uid (% uid is the login for Owncloud)
User List Filter : objectClass=person (to select only our AD users)
Group Filter : objectClass=group (same as above)

Advanced :
Base User Tree : ou=OwncloudAccess,dc=fr,dc=alexnogard,dc=com (users location).
Base Group Tree : ou=OwncloudAccess,dc=fr,dc=alexnogard,dc=com (same as above).
Group-member association : member (AD).
Case Insensitive LDAP server (Windows) : tick
User Display Name Field : sAMAccountName (It uses the Windows identifier sAMAccountName)
Group Display Name Field : sAMAccountName (It uses the Windows identifier sAMAccountName)

Owncloud Active Directory
LDAP Basic configuration for Owncloud & Active Directory
Owncloud Active Directory
Advanced configuration

Now you click on “Save” and then “Test Configuration” :

Owncloud 4.5.4 Validation of our Active Directory configuration for Owncloud

Now simply go to “Users” to see the result:

Owncloud Active DirectoryFound my Active Directory users associated with their group: OwncloudGroup

If you have any trouble, go to Administration, all the way down to see the logs:

Active Directory Owncloud
Owncloud error log

You know how to connect your Owncloud with Active Directory. This tutorial has been tested with Windows Server 2008 & 2012, and it is supposed to work with Windows Server 2003.

For any questions or comments, thank you use comments ;)

It’s my first english traduction, let me know if I made mistakes

7 Responses to OwnCloud 4.5.4 : Windows Server Active Directory Authentication.

  1. Anthony says:

    What if I don’t want my users in an OwnCLoud OU – I have them in different OUs already? I’m happy to have the OwnCloud group to control who can use.

  2. Pingback: Bookmarks for 4 feb 2013 through 13 feb 2013 | jtheo

  3. kashif lari says:

    The configuration is valid, but the Bind failed. Please check the server settings and credentials. THIS is Connection test Failed

    Error user_ldap Connection could not be established

  4. Alexander Ekberg says:

    The configuration is valid, but the Bind failed. Please check the server settings and credentials. THIS is Connection test Failed

    Error user_ldap Connection could not be established

  5. brrrz says:

    works like a charme with a samba4 AD PDC!

    thanks!

  6. João Miguel Pinto says:

    Thank you for the tutorial! You are my hero, because a few months ago I’ve been trying various settings and never got a successful connection.
    Thank you very much!

  7. gajosew says:

    a great job :-)

Leave a Reply

Your email address will not be published. Required fields are marked *