First I like to create a system user in FreeIPA and add it to the system users group and give it a password. This will allow Nextcloud to browse the directory to get a list of users and groups.

Then, after activating the user-ldap plugin, go to the administration page and find the LDAP section. The LDAP configuration is done by sequentially filling form fields in six tabs: Server, Users, Login Attributes, Groups, Advanced and Experts.

By the way, I don't mind showing the world my IPA domain and the hostname because none of that is directly exposed to the Internet and I don't believe in security through obscurity.

Server

Since the communication between my Nextcloud and FreeIPA servers are done on a trusted network, I don't use LDAP over SSL, and I don't specify the ldaps:// prefix, just the hostname and the 389 port. The bind DN looks something like this:

uid=nextcloud,cn=users,cn=accounts,dc=private,dc=deverteuil,dc=net

…and the base DN is your FreeIPA domain in LDIF format:

dc=private,dc=deverteuil,dc=net

screenshot of the Server tab

Users

Just select "Only these object classes: posixAccount".

screenshot of the Users tab

Login Attributes

For the section "[…] find the user based on the following attributes:", check "LDAP / AD Username".

screenshot of the Login Attributes tab

Groups

I suggest you create a usergroup in FreeIPA called "nextcloud_users" and add the users authorized to login to Nextcloud to it.

Select "Only these object classes: ipausergroup" and "Only from these groups: nextcloud_users".

screenshot of the Groups tab

Advanced

Fill in the following field in the Directory Settings section:

Of course, replace dc=example,dc=com with your own base DN.

screenshot of the Advanced tab, Directory Settings section

In the Special Attributes section, fill in these:

screenshot of the Advanced tab, Special Attributes section

Expert

screenshot of the Expert tab

References

I used Apache Directory Studio to learn the LDAP schema on my FreeIPA server.

This reference was a good start but not quite complete: Owncloud Authentication against FreeIPA

Software versions

Nextcloud 9.0.51
FreeIPA 4.3.1

Comments

Comment Atom Feed

There are no comments yet.

Add a Comment

You can use the Markdown syntax to format your comment.