Page 1 of 1

LDAP and Settings files

Posted: Wed Jan 30, 2019 4:19 pm
by morten
This product completely looks like a go-er for our internal project, however i really do need LDAP working for it to fly.
I've been following the various guides and forum posts, but cannot get it to even reference the settings files correctly.

Ubuntu 16.0.4 LTS. Installed Mayan EDMS via the Basic Installation instructions.

I've created a simple LDAP config file that actually has nothing in it except the following:

Code: Select all

from mayan.settings.production import *
This settings file (called is located /opt/mayan-edms/media/maya_settings/

Once that's done, am i right in thinking i then edit the supervisor config file? This is what I have been doing... and I've been modifying the following line to say:

Code: Select all

But once done, supervisor doesnt start up mayan.

What am I doing wrong? Can someone help me better understand how to use LDAP, or at the very least - where to modify my settings files, and how to get them loaded correctly when using Supervisor?


Re: LDAP and Settings files

Posted: Wed Jan 30, 2019 5:18 pm
by daniel1113
It's actually incredibly simple, but the lack of documentation complicates things. Here's what you need.

First, create your settings file ( or whatever). Your simple configuration file should be sufficient for testing.

Second, save it to the correct location for your deployment (direct vs. Docker): ... ngs_module. Looking at your path, it looks like you have a direct deployment. If so, there's a typo in your path. It's "mayan_settings" not "maya_settings."

Third, tell Mayan to import this file. Again, this depends on your deployment. For Docker, it's as simple as setting the MAYAN_SETTINGS_MODULE variable on startup. For a file called, it is:

Code: Select all

Direct deployment is explained in the documentation linked above.

With just those changes, you should have no problem loading the settings file and implementing LDAP. I suspect the problem is due to your incorrect path above.

Re: LDAP and Settings files

Posted: Wed Jan 30, 2019 5:28 pm
by morten
thanks - I'l give this a go tomorrow.

For completeness - yes its a direct installation method, and the spelling mistake was in the forum post, not my configuration! :)

So as it's a basic direct installation, do i modify the supervisor config file - more specifically the DJANGO_SETTINGS_MODULE within it?
I note for docker you mention MAYAN_SETTINGS_MODULE.


Re: LDAP and Settings files

Posted: Thu Jan 31, 2019 11:15 am
by simeon
I have also been trying to do this and found there is an error in the docs:

I followed the direct deploy instructions, adapting them to CentOS 7 along the way.
The supervisord config shows a line:

Code: Select all

This actually needs to be:

Code: Select all

Then the docs for settings say that something like this is required:

Code: Select all

but this is what works:

Code: Select all

Once I made the above changes then my local settings are used.

Hope that helps,

Re: LDAP and Settings files

Posted: Thu Jan 31, 2019 3:26 pm
by morten
wow - that appears to have worked (well it hasnt errored)! Thank you !

I've used the demo config tuned accordingly from the gitlab repo - how do I test and configure the LDAP further?

I've done the obvious and logon as an AD user.. but i get "

Code: Select all

Please enter a correct username and password. Note that both fields may be case-sensitive. "
Is there anything else i need to do to tell it to do the LDAP authentication? Or - what log files does it write to for this?


EDIT: Scrap that.. it didnt work, i restarted supervisior, i didnt re-read it. When i re-read it and updated it, it still failed to load. However.. my question still stands - how do i check it is doing LDAP auth? Log files? anything extra i need to do?

TIA :)