Re: Edx LDAP Auth setting

2021-05-27 Thread Shailesh Yadav
Can you paste the below code into settings.py and check the error log and
how you have configured it?.

Checking the log file in Terminal
logger = logging.getLogger('django_auth_ldap')
logger.addHandler(logging.StreamHandler())

logger.setLevel(logging.DEBUG)

Thanks & Regards
Shailesh Yadav
+91-9920886044

  [image: Linkedin] 



On Thu, May 27, 2021 at 9:47 PM Adil Kadiyawala <
adil.kadiyaw...@drcsystems.com> wrote:

> Hello All,
> I have configured LDAP server and when I try to login then it throws an
> error : "*Authentication Failed Error*". Here is a log.
> Can you please help me to resolve it?
>
> login.py:398] - {'value': u'$
> Traceback (most recent call last):
>   File
> "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/user_authn/views/login.py",
> line 380, in login_user
> handle_failed_authentication(user, possibly_authenticated_user)
>   File
> "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/user_authn/views/login.py",
> line 236, in _handle_failed_authentication
> raise AuthFailedError(('Email or password is incorrect.'))
> AuthFailedError
>
> Thanks and Regards,
> Adil
> On Wednesday, 23 May 2018 at 20:53:29 UTC+5:30 Abdelkrime Agrou wrote:
>
>> Hi could you help me please,
>> I would like to configure LDAP Active directory with my new installation
>> of open edx native.
>>
>> Please help me to get that working.
>> Thnaks
>> Regards,
>>
>>
>> Le lundi 13 février 2017 10:10:53 UTC, Faruk D. a écrit :
>>>
>>> Hi Yip,
>>>
>>> I could fix the issues.
>>>
>>> Thank you very much for your help.
>>>
>>> Kind regard
>>> Faruk
>>>
>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/70160318-c830-4bfe-bf21-61c663c869d9n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMQ-AEXDNs-LnkxNPQNhXPfST3K%2BR9X4msmOxWAqKyME4jcREQ%40mail.gmail.com.


Re: Edx LDAP Auth setting

2021-05-27 Thread Adil Kadiyawala
Hello All,
I have configured LDAP server and when I try to login then it throws an 
error : "*Authentication Failed Error*". Here is a log.
Can you please help me to resolve it?

login.py:398] - {'value': u'$
Traceback (most recent call last):
  File 
"/edx/app/edxapp/edx-platform/openedx/core/djangoapps/user_authn/views/login.py",
 
line 380, in login_user
handle_failed_authentication(user, possibly_authenticated_user)
  File 
"/edx/app/edxapp/edx-platform/openedx/core/djangoapps/user_authn/views/login.py",
 
line 236, in _handle_failed_authentication
raise AuthFailedError(('Email or password is incorrect.'))
AuthFailedError

Thanks and Regards,
Adil
On Wednesday, 23 May 2018 at 20:53:29 UTC+5:30 Abdelkrime Agrou wrote:

> Hi could you help me please,
> I would like to configure LDAP Active directory with my new installation 
> of open edx native.
>
> Please help me to get that working.
> Thnaks
> Regards,
>
>
> Le lundi 13 février 2017 10:10:53 UTC, Faruk D. a écrit :
>>
>> Hi Yip,
>>
>> I could fix the issues. 
>>
>> Thank you very much for your help. 
>>
>> Kind regard 
>> Faruk 
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/70160318-c830-4bfe-bf21-61c663c869d9n%40googlegroups.com.


Re: Edx LDAP Auth setting

2018-05-23 Thread Abdelkrime Agrou
Hi could you help me please,
I would like to configure LDAP Active directory with my new installation of 
open edx native.

Please help me to get that working.
Thnaks
Regards,

Le lundi 13 février 2017 10:10:53 UTC, Faruk D. a écrit :
>
> Hi Yip,
>
> I could fix the issues. 
>
> Thank you very much for your help. 
>
> Kind regard 
> Faruk 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b1bea767-a2f7-44e3-8fb4-f901ccc0e0c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Edx LDAP Auth setting

2017-02-13 Thread 'Faruk D.' via Django users
Hi Yip,

I could fix the issues. 

Thank you very much for your help. 

Kind regard 
Faruk 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b705fee7-4319-4e75-8374-3ac94014d56c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Edx LDAP Auth setting

2017-01-25 Thread Pierre-Philippe Fady
Sorry, i was wrong, you need to write :

if not db_profile:

Le mercredi 18 janvier 2017 21:10:56 UTC+1, Faruk D. a écrit :
>
> Hi Yip,
>
> Thanks for your Instruction.
>
> While trying to update the database record like you explained on step 16. 
> I got some error messages. 
> Im not so familar with that django and python stuff.
>
> Im going to give a description of my errors. I hope someone can help me. 
>
> I am using the following Fullstack Version in a Vagrantbox:
>
> Eucalyptus.1
> 2016-08-26 
>
> open-release/eucalyptus.1
>
> f
> After finishing all steps I try to update the database record with:  paver 
> update_db --settings=aws
>
> Then i got following message:
>
> /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django_auth_ldap/backend.py",
>  
> line 55, in 
> from django.db import *
> AttributeError: 'module' object has no attribute 'backend'
>
> I try to fix the issue with changing 
> from django.db import *
> to 
> from django.db import models
>
> I try it again and after that following error was printed:
>
>   File 
> "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/registry.py",
>  
> line 131, in check_models_ready
> raise AppRegistryNotReady("Models aren't loaded yet.")
> django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.
>
> My question now is:
>
> With which OpenEdX version was it working for you.
> Have you set the THIRD_PARTY_AUTHENTICATION variable in the lms.env.json 
> to true?
>
> If you need more information just let me know.
>
> Best regards
> F.D.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a133e130-117d-45be-b52d-e5882721b7ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Edx LDAP Auth setting

2017-01-18 Thread 'Faruk D.' via Django users
Hi Yip,

Thanks for your Instruction.

While trying to update the database record like you explained on step 16. I 
got some error messages. 
Im not so familar with that django and python stuff.

Im going to give a description of my errors. I hope someone can help me. 

I am using the following Fullstack Version in a Vagrantbox:

Eucalyptus.1
2016-08-26 

open-release/eucalyptus.1

f
After finishing all steps I try to update the database record with:  paver 
update_db --settings=aws

Then i got following message:

/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django_auth_ldap/backend.py",
 
line 55, in 
from django.db import *
AttributeError: 'module' object has no attribute 'backend'

I try to fix the issue with changing 
from django.db import *
to 
from django.db import models

I try it again and after that following error was printed:

  File 
"/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/registry.py",
 
line 131, in check_models_ready
raise AppRegistryNotReady("Models aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.

My question now is:

With which OpenEdX version was it working for you.
Have you set the THIRD_PARTY_AUTHENTICATION variable in the lms.env.json to 
true?

If you need more information just let me know.

Best regards
F.D.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5ca9dc9e-0109-4ac1-9ac8-b8c85e73ee2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Edx LDAP Auth setting

2017-01-11 Thread Pierre-Philippe Fady
I found one solution :

in this section :

9.  Add the following code after “if not third_party_auth_successful:”

I've replace

if db_profile is user:
by

if db_profile is None:


Le mercredi 11 janvier 2017 11:50:32 UTC+1, Pierre-Philippe Fady a écrit :
>
>
> Thank you from this explications.
>
> Please could you help me about that ?
>
> I can connect with an account from LDAP the first time, but next, i've an 
> error : IntegrityError: (1062, "Duplicate entry '37' for key 'user_id'")
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/39636d64-d19a-4390-9c09-4da8a2026902%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Edx LDAP Auth setting

2017-01-11 Thread Pierre-Philippe Fady

Thank you from this explications.

Please could you help me about that ?

I can connect with an account from LDAP the first time, but next, i've an 
error : IntegrityError: (1062, "Duplicate entry '37' for key 'user_id'")

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b719d5da-7ac2-4f08-9636-60b3ce7d47ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Edx LDAP Auth setting

2017-01-03 Thread 'Yip Terence' via Django users
16.  Update the database record
cd /edx/app/edxapp/edx-platform
sudo -H -u edxapp bash
source /edx/app/edxapp/edxapp_env
paver update_db --se ttings=aws
paver update_assets lms --settings=aws
 
17.  Restart Service
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp 
_worker:

Thanks and Regards,
Terence Yip

Yip Terence於 2015年2月10日星期二 UTC+8下午12時00分30秒寫道:
>
> Dear All,
>
> I have been installed the open edx and django_auth_ldap package (
> http://code.edx.org/) in our environment.  However, I'm not successful to 
> config the Auth with LDAP.  Could anyone could provide the guide to me?  I 
> don't know where is the settings.py file path in open edx.
>
> Please help.
>
> Thanks and Regards,
> Terence Yip
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5550f1e5-b5cd-4652-b266-869beb2d8c15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Edx LDAP Auth setting

2017-01-03 Thread 'Yip Terence' via Django users
Dear all,

I'm not sure is it the correct setting, but the setting is working for me. 
 Please find the steps as follows.

1.  Download LDAP packages
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
sudo pip install python-ldap
 
2.  Install Django LDAP Library
pip install django - auth - ldap
 
3.  LDAP connection setup
vi 
/edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django_auth_ldap/backend.py
 
4.  Add DB model for select database record











5.  Add the checking function in “if save_user”







6.  Edit “LDAPSettings(object)”
















7.  Save and Exit.
 
8.  Collect the user value and add create profile function in “views.py”
vi /edx/app/edxapp/edx-platform/common/djangoapps/student/views.py
 

 
9.  Add the following code after “if not third_party_auth_successful:”













10.  Add the backend function to “common.py”
vi /edx/app/edxapp/edx-platform/lms/envs/common.py
 
11.  Edit “AUTHENICATION_BACKENDS”






12.  Edit “INSTALLED_APPS”








13.  Add the backend function to “common.py”
vi /edx/app/edxapp/edx-platform/cms/envs/common.py
 
14.  Edit “AUTHENICATION_BACKENDS”






15.  Edit “INSTALLED_APPS”








16.  Update the database record
cd /edx/app/edxapp/edx-platform
sudo -H -u edxapp bash
source /edx/app/edxapp/edxapp_env
paver update_db --se ttings=aws
paver update_assets lms --settings=aws
 
17.  Restart Service
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp 
_worker:

Thanks and Regards,
Terence Yip


Yip Terence於 2015年2月10日星期二 UTC+8下午12時00分30秒寫道:
>
> Dear All,
>
> I have been installed the open edx and django_auth_ldap package (
> http://code.edx.org/) in our environment.  However, I'm not successful to 
> config the Auth with LDAP.  Could anyone could provide the guide to me?  I 
> don't know where is the settings.py file path in open edx.
>
> Please help.
>
> Thanks and Regards,
> Terence Yip
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7d13d75a-aa76-4ec0-a29a-198b6f67dea3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Edx LDAP Auth setting

2017-01-03 Thread 'Yip Terence' via Django users
Hi all,

I'm not sure is it the correct setting, but the setting is working for me. 
 Please find the steps as follows.

1.  Download LDAP packages
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
sudo pip install python-ldap
 
2.  Install Django LDAP Library
pip install django - auth - ldap
 
3.  LDAP connection setup
vi 
/edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django_auth_ldap/backend.py
 
4.  Add DB model for select database record
 [image: 內嵌圖像]

5.  Add the checking function in “if save_user”
[image: 內嵌圖像]

 
6.  Edit “LDAPSettings(object)”
[image: 內嵌圖像]

 
7.  Save and Exit.
 
8.  Collect the user value and add create profile function in “views.py”
vi /edx/app/edxapp/edx-platform/common/djangoapps/student/views.py
 

 
9.  Add the following code after “if not third_party_auth_successful:”
[image: 內嵌圖像]

 
10.  Add the backend function to “common.py”
vi /edx/app/edxapp/edx-platform/lms/envs/common.py
 
11.  Edit “AUTHENICATION_BACKENDS”
 [image: 內嵌圖像]

 
12.  Edit “INSTALLED_APPS”
[image: 內嵌圖像]

 
13.  Add the backend function to “common.py”
vi /edx/app/edxapp/edx-platform/cms/envs/common.py
 
14.  Edit “AUTHENICATION_BACKENDS”
[image: 內嵌圖像]

  
15.  Edit “INSTALLED_APPS”
[image: 內嵌圖像]
 

16.  Update the database record
cd /edx/app/edxapp/edx-platform
sudo -H -u edxapp bash
source /edx/app/edxapp/edxapp_env
paver update_db --se ttings=aws
paver update_assets lms --settings=aws
 
17.  Restart Service
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp: 
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart 
edxapp_worker:

Thanks and Regards,
Terence Yip

Yip Terence於 2015年2月10日星期二 UTC+8下午12時00分30秒寫道:
>
> Dear All,
>
> I have been installed the open edx and django_auth_ldap package (
> http://code.edx.org/) in our environment.  However, I'm not successful to 
> config the Auth with LDAP.  Could anyone could provide the guide to me?  I 
> don't know where is the settings.py file path in open edx.
>
> Please help.
>
> Thanks and Regards,
> Terence Yip
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0ec84fc3-4c54-4cdc-8588-10a80c796016%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Edx LDAP Auth setting

2016-12-19 Thread 'Faruk D.' via Django users
Hi Y.,

could you slove this issue? If yes could you post your solution.

Best regards 
F.D.

Am Dienstag, 10. Februar 2015 05:00:30 UTC+1 schrieb Yip Terence:
>
> Dear All,
>
> I have been installed the open edx and django_auth_ldap package (
> http://code.edx.org/) in our environment.  However, I'm not successful to 
> config the Auth with LDAP.  Could anyone could provide the guide to me?  I 
> don't know where is the settings.py file path in open edx.
>
> Please help.
>
> Thanks and Regards,
> Terence Yip
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5bdd7fd6-884a-4354-9220-03b5b9197362%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Edx LDAP Auth setting

2016-08-05 Thread piglesias
Hi guys,

I'm having some problems to add LDAP auth to my edx app. I've follow your 
steps but I'm not getting any exit in edx log... I can connect and make 
querys against my ldap server using shell. Could you help me? I'm using 
fullstack dogwood environment

El jueves, 26 de febrero de 2015, 10:24:22 (UTC+1), Yip Terence escribió:
>
> Hi M and L,
>  
> Attached please find the output in /edx/var/log/lms/edx.log
> Django can't to get the %user value.
>  
>  
> Config:
> 
> AUTH_LDAP_USER_SEARCH = LDAPSearch('OU=Users', ldap.SCOPE_SUBTREE, 
> "(&(mail=%(user)s))(objectClass=User)(objectCategory=person))")
> -
>  
> Error MSG:
>
> ---
> Feb 26 17:18:33 ethiopia 
> [service_variant=lms][django_auth_ldap][env:sandbox] ERROR [ethiopia  3016] 
> [config.py:166] - search_s('OU=Users', 2, 
> '(&(mail=))(objectClass=User)(objectCategory=person))') raised 
> FILTER_ERROR({'desc': 'Bad search filter'},)
>
> ---
>  
> Thanks and Regards,
> Terence Yip
>
> Yip Terence於 2015年2月26日星期四 UTC+8下午3時02分38秒寫道:
>
>> Hi M,
>>  
>> Actually, I can connect with our AD server, but I need to hardcode the 
>> user in the connection string so that I would like to ask for the solution 
>> about how can I get the %user value and create the profile.  
>>  
>> Maybe I can paste my connection string here for more easy to understand.  
>> I have been pasted the following code in 
>> /edx/app/edxapp/edx-platform/lms/envs/common.py.  I can successful login to 
>> edX when I hardcode the user in "AUTH_LDAP_USER_SEARCH".  Is that paste 
>> the code in the wrong location? 
>>  
>>  
>>
>> ---
>> import ldap
>> from django_auth_ldap.config import LDAPSearch, GroupOfNamesType, 
>> PosixGroupType
>> #AUTH_LDAP_START_TLS = True
>> AUTH_LDAP_GLOBAL_OPTIONS = {
>>  ldap.OPT_X_TLS_REQUIRE_CERT: False,
>>  ldap.OPT_REFERRALS: False,
>> }
>> # Baseline configuration.
>> AUTH_LDAP_SERVER_URI = "ldap://dc.abc.hk:389";
>> AUTH_LDAP_BIND_DN = "CN=connection_account,OU=SystemAcct,DC=abc,DC=hk"
>> AUTH_LDAP_BIND_PASSWORD = "password"
>> user = request.user
>> AUTH_LDAP_USER_SEARCH = LDAPSearch('OU=Users,DC=abc,DC=hk', 
>> ldap.SCOPE_SUBTREE, "(&(
>> mail=u...@abc.hk)(objectClass=User)(objectCategory=person 
>> ))")
>>  
>> AUTH_LDAP_ALWAYS_UPDATE_USER = True
>> # Set up the basic group parameters.
>> AUTH_LDAP_GROUP_SEARCH = LDAPSearch('OU=Users,DC=vtc,DC=hk', 
>> ldap.SCOPE_SUBTREE, "(&(objectClass=User)(objectCategory=person))")
>>  
>> # set group type
>> AUTH_LDAP_GROUP_TYPE = PosixGroupType()
>> AUTH_LDAP_CONNECTION_OPTIONS = {
>>  ldap.OPT_REFERRALS: 0,
>> }
>>  
>> # Simple group restrictions
>> #~ AUTH_LDAP_REQUIRE_GROUP = 
>> "cn=enabled,ou=django,ou=groups,dc=example,dc=com"
>> #~ AUTH_LDAP_DENY_GROUP = 
>> "cn=disabled,ou=django,ou=groups,dc=example,dc=com"
>> # Populate the Django user from the LDAP directory.
>> AUTH_LDAP_USER_ATTR_MAP = {
>>  "username": "cn",
>>  "first_name": "givenName",
>>  "last_name": "sn",
>>  "email": "mail"
>> }
>>  
>> AUTH_LDAP_PROFILE_ATTR_MAP = {
>>  "name": "cn"
>> }
>>
>> # important! to use the group's permission
>> AUTH_LDAP_MIRROR_GROUPS = True
>> # Use LDAP group membership to calculate group permissions.
>> AUTH_LDAP_FIND_GROUP_PERMS = True
>> # Cache group memberships for an hour to minimize LDAP traffic
>> AUTH_LDAP_CACHE_GROUPS = True
>> AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600
>>
>> -
>>  
>> Looking for your reply.  Thanks!
>>  
>> Thanks and Regards,
>> Terence Yip
>>
>> somecallitblues於 2015年2月24日星期二 UTC+8下午7時09分22秒寫道:
>>
>>> To check the version go to shell and run this:
>>>
>>> >>> import django_auth_ldap
>>>
>>> >>> django_auth_ldap.version
>>>
>>> (1, 1, 2)
>>>
>>> >>> 
>>>
>>> As for virtualenv, it's a good practice but it's not necessary. 
>>>
>>> By the way, have you tried performing a simple search on the LDAP 
>>> server? I think that your best bet is to start with python-ldap (forget 
>>> about django_auth_ldap), try to connect to the server, perform a bind and 
>>> get a feel for it. 
>>>
>>> I normally open the shell and run something like this in it 
>>> https://bpaste.net/show/d4348eb1b3dd
>>>
>>> You have to know the following:
>>>
>>> - protocol (secure or not)
>>>
>>> - IP or domain name of the LDAP server
>>>
>>> - port
>>>
>>> - A full DN of one of the users would be useful but once you establish 
>>> the connection you can figure this out.
>>>
>>> I remember that I was using Django 1.5.x and django_auth_ldap was still 
>>> using User model by default. Not sure if that's still the case but you may 
>>

Re: Edx LDAP Auth setting

2015-02-26 Thread 'Yip Terence' via Django users
Hi M and L,
 
Attached please find the output in /edx/var/log/lms/edx.log
Django can't to get the %user value.
 
 
Config:

AUTH_LDAP_USER_SEARCH = LDAPSearch('OU=Users', ldap.SCOPE_SUBTREE, 
"(&(mail=%(user)s))(objectClass=User)(objectCategory=person))")
-
 
Error MSG:
---
Feb 26 17:18:33 ethiopia 
[service_variant=lms][django_auth_ldap][env:sandbox] ERROR [ethiopia  3016] 
[config.py:166] - search_s('OU=Users', 2, 
'(&(mail=))(objectClass=User)(objectCategory=person))') raised 
FILTER_ERROR({'desc': 'Bad search filter'},)
---
 
Thanks and Regards,
Terence Yip

Yip Terence於 2015年2月26日星期四 UTC+8下午3時02分38秒寫道:

> Hi M,
>  
> Actually, I can connect with our AD server, but I need to hardcode the 
> user in the connection string so that I would like to ask for the solution 
> about how can I get the %user value and create the profile.  
>  
> Maybe I can paste my connection string here for more easy to understand.  
> I have been pasted the following code in 
> /edx/app/edxapp/edx-platform/lms/envs/common.py.  I can successful login to 
> edX when I hardcode the user in "AUTH_LDAP_USER_SEARCH".  Is that paste 
> the code in the wrong location? 
>  
>  
>
> ---
> import ldap
> from django_auth_ldap.config import LDAPSearch, GroupOfNamesType, 
> PosixGroupType
> #AUTH_LDAP_START_TLS = True
> AUTH_LDAP_GLOBAL_OPTIONS = {
>  ldap.OPT_X_TLS_REQUIRE_CERT: False,
>  ldap.OPT_REFERRALS: False,
> }
> # Baseline configuration.
> AUTH_LDAP_SERVER_URI = "ldap://dc.abc.hk:389";
> AUTH_LDAP_BIND_DN = "CN=connection_account,OU=SystemAcct,DC=abc,DC=hk"
> AUTH_LDAP_BIND_PASSWORD = "password"
> user = request.user
> AUTH_LDAP_USER_SEARCH = LDAPSearch('OU=Users,DC=abc,DC=hk', 
> ldap.SCOPE_SUBTREE, "(&(
> mail=usern...@abc.hk)(objectClass=User)(objectCategory=person))")
>  
> AUTH_LDAP_ALWAYS_UPDATE_USER = True
> # Set up the basic group parameters.
> AUTH_LDAP_GROUP_SEARCH = LDAPSearch('OU=Users,DC=vtc,DC=hk', 
> ldap.SCOPE_SUBTREE, "(&(objectClass=User)(objectCategory=person))")
>  
> # set group type
> AUTH_LDAP_GROUP_TYPE = PosixGroupType()
> AUTH_LDAP_CONNECTION_OPTIONS = {
>  ldap.OPT_REFERRALS: 0,
> }
>  
> # Simple group restrictions
> #~ AUTH_LDAP_REQUIRE_GROUP = 
> "cn=enabled,ou=django,ou=groups,dc=example,dc=com"
> #~ AUTH_LDAP_DENY_GROUP = 
> "cn=disabled,ou=django,ou=groups,dc=example,dc=com"
> # Populate the Django user from the LDAP directory.
> AUTH_LDAP_USER_ATTR_MAP = {
>  "username": "cn",
>  "first_name": "givenName",
>  "last_name": "sn",
>  "email": "mail"
> }
>  
> AUTH_LDAP_PROFILE_ATTR_MAP = {
>  "name": "cn"
> }
>
> # important! to use the group's permission
> AUTH_LDAP_MIRROR_GROUPS = True
> # Use LDAP group membership to calculate group permissions.
> AUTH_LDAP_FIND_GROUP_PERMS = True
> # Cache group memberships for an hour to minimize LDAP traffic
> AUTH_LDAP_CACHE_GROUPS = True
> AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600
>
> -
>  
> Looking for your reply.  Thanks!
>  
> Thanks and Regards,
> Terence Yip
>
> somecallitblues於 2015年2月24日星期二 UTC+8下午7時09分22秒寫道:
>
>> To check the version go to shell and run this:
>>
>> >>> import django_auth_ldap
>>
>> >>> django_auth_ldap.version
>>
>> (1, 1, 2)
>>
>> >>> 
>>
>> As for virtualenv, it's a good practice but it's not necessary. 
>>
>> By the way, have you tried performing a simple search on the LDAP server? 
>> I think that your best bet is to start with python-ldap (forget about 
>> django_auth_ldap), try to connect to the server, perform a bind and get a 
>> feel for it. 
>>
>> I normally open the shell and run something like this in it 
>> https://bpaste.net/show/d4348eb1b3dd
>>
>> You have to know the following:
>>
>> - protocol (secure or not)
>>
>> - IP or domain name of the LDAP server
>>
>> - port
>>
>> - A full DN of one of the users would be useful but once you establish 
>> the connection you can figure this out.
>>
>> I remember that I was using Django 1.5.x and django_auth_ldap was still 
>> using User model by default. Not sure if that's still the case but you may 
>> have to patch it.
>>
>> Good luck!
>>
>> M
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On 24 February 2015 at 17:37, 'Yip Terence' via Django users <
>> django...@googlegroups.com> wrote:
>>
>>> Hi L,
>>>
>>>  
>>>
>>> Thanks for your reply.
>>>
>>>  
>>>
>>> I’m through pip to install the django-auth-ldap already.  But there are 
>>> two question here. 
>>>
>>> 1.   How can I check the django-auth-ldap version?
>>>
>>> 2.   What do you mean of install via virt env? I’m follow the edX 
>>> Ubuntu 12.04 

Re: Edx LDAP Auth setting

2015-02-25 Thread 'Yip Terence' via Django users
Hi M,
 
Actually, I can connect with our AD server, but I need to hardcode the user 
in the connection string so that I would like to ask for the solution about 
how can I get the %user value and create the profile.  
 
Maybe I can paste my connection string here for more easy to understand.  I 
have been pasted the following code in 
/edx/app/edxapp/edx-platform/lms/envs/common.py.  I can successful login to 
edX when I hardcode the user in "AUTH_LDAP_USER_SEARCH".  Is that paste 
the code in the wrong location? 
 
 
---
import ldap
from django_auth_ldap.config import LDAPSearch, GroupOfNamesType, 
PosixGroupType
#AUTH_LDAP_START_TLS = True
AUTH_LDAP_GLOBAL_OPTIONS = {
 ldap.OPT_X_TLS_REQUIRE_CERT: False,
 ldap.OPT_REFERRALS: False,
}
# Baseline configuration.
AUTH_LDAP_SERVER_URI = "ldap://dc.abc.hk:389";
AUTH_LDAP_BIND_DN = "CN=connection_account,OU=SystemAcct,DC=abc,DC=hk"
AUTH_LDAP_BIND_PASSWORD = "password"
user = request.user
AUTH_LDAP_USER_SEARCH = LDAPSearch('OU=Users,DC=abc,DC=hk', 
ldap.SCOPE_SUBTREE, "(&(
mail=usern...@abc.hk)(objectClass=User)(objectCategory=person))")
 
AUTH_LDAP_ALWAYS_UPDATE_USER = True
# Set up the basic group parameters.
AUTH_LDAP_GROUP_SEARCH = LDAPSearch('OU=Users,DC=vtc,DC=hk', 
ldap.SCOPE_SUBTREE, "(&(objectClass=User)(objectCategory=person))")
 
# set group type
AUTH_LDAP_GROUP_TYPE = PosixGroupType()
AUTH_LDAP_CONNECTION_OPTIONS = {
 ldap.OPT_REFERRALS: 0,
}
 
# Simple group restrictions
#~ AUTH_LDAP_REQUIRE_GROUP = 
"cn=enabled,ou=django,ou=groups,dc=example,dc=com"
#~ AUTH_LDAP_DENY_GROUP = 
"cn=disabled,ou=django,ou=groups,dc=example,dc=com"
# Populate the Django user from the LDAP directory.
AUTH_LDAP_USER_ATTR_MAP = {
 "username": "cn",
 "first_name": "givenName",
 "last_name": "sn",
 "email": "mail"
}
 
AUTH_LDAP_PROFILE_ATTR_MAP = {
 "name": "cn"
}

# important! to use the group's permission
AUTH_LDAP_MIRROR_GROUPS = True
# Use LDAP group membership to calculate group permissions.
AUTH_LDAP_FIND_GROUP_PERMS = True
# Cache group memberships for an hour to minimize LDAP traffic
AUTH_LDAP_CACHE_GROUPS = True
AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600
-
 
Looking for your reply.  Thanks!
 
Thanks and Regards,
Terence Yip

somecallitblues於 2015年2月24日星期二 UTC+8下午7時09分22秒寫道:

> To check the version go to shell and run this:
>
> >>> import django_auth_ldap
>
> >>> django_auth_ldap.version
>
> (1, 1, 2)
>
> >>> 
>
> As for virtualenv, it's a good practice but it's not necessary. 
>
> By the way, have you tried performing a simple search on the LDAP server? 
> I think that your best bet is to start with python-ldap (forget about 
> django_auth_ldap), try to connect to the server, perform a bind and get a 
> feel for it. 
>
> I normally open the shell and run something like this in it 
> https://bpaste.net/show/d4348eb1b3dd
>
> You have to know the following:
>
> - protocol (secure or not)
>
> - IP or domain name of the LDAP server
>
> - port
>
> - A full DN of one of the users would be useful but once you establish the 
> connection you can figure this out.
>
> I remember that I was using Django 1.5.x and django_auth_ldap was still 
> using User model by default. Not sure if that's still the case but you may 
> have to patch it.
>
> Good luck!
>
> M
>
>
>
>
>
>
>
>
>
> On 24 February 2015 at 17:37, 'Yip Terence' via Django users <
> django...@googlegroups.com > wrote:
>
>> Hi L,
>>
>>  
>>
>> Thanks for your reply.
>>
>>  
>>
>> I’m through pip to install the django-auth-ldap already.  But there are 
>> two question here. 
>>
>> 1.   How can I check the django-auth-ldap version?
>>
>> 2.   What do you mean of install via virt env? I’m follow the edX 
>> Ubuntu 12.04 +64 bit installation guide to install the edX, is that virt 
>> env? 
>>
>>
>> *https://github.com/edx/configuration/wiki/edX-Ubuntu-12.04-64-bit-Installation*
>>  
>> 
>>
>>  
>>
>>
>> -
>>
>> root@ethiopia:/edx/app/edxapp/edx-platform/lms/envs# pip install 
>> django-auth-ldap
>>
>> Requirement already satisfied (use --upgrade to upgrade): 
>> django-auth-ldap in /usr/local/lib/python2.7/dist-packages
>>
>> Requirement already satisfied (use --upgrade to upgrade): django in 
>> /usr/local/lib/python2.7/dist-packages (from django-auth-ldap)
>>
>> Requirement already satisfied (use --upgrade to upgrade): 
>> python-ldap>=2.0 in /usr/local/lib/python2.7/dist-packages (from 
>> django-auth-ldap)
>>
>> Requirement already satisfied (use --upgrade to upgrade): setuptools in 
>> /usr/local/lib/python2.7/dist-packages (from 
>> python-ldap>=2.0->django-auth-ldap)
>>  
>> Cleaning up...
>>  
>>  
>>
>> Thanks and Regards,
>>
>> Terence Yip
>>
>

Re: Edx LDAP Auth setting

2015-02-24 Thread Mario Gudelj
To check the version go to shell and run this:

>>> import django_auth_ldap

>>> django_auth_ldap.version

(1, 1, 2)

>>>

As for virtualenv, it's a good practice but it's not necessary.

By the way, have you tried performing a simple search on the LDAP server? I
think that your best bet is to start with python-ldap (forget about
django_auth_ldap), try to connect to the server, perform a bind and get a
feel for it.

I normally open the shell and run something like this in it
https://bpaste.net/show/d4348eb1b3dd

You have to know the following:

- protocol (secure or not)

- IP or domain name of the LDAP server

- port

- A full DN of one of the users would be useful but once you establish the
connection you can figure this out.

I remember that I was using Django 1.5.x and django_auth_ldap was still
using User model by default. Not sure if that's still the case but you may
have to patch it.

Good luck!

M









On 24 February 2015 at 17:37, 'Yip Terence' via Django users <
django-users@googlegroups.com> wrote:

> Hi L,
>
>
>
> Thanks for your reply.
>
>
>
> I’m through pip to install the django-auth-ldap already.  But there are
> two question here.
>
> 1.   How can I check the django-auth-ldap version?
>
> 2.   What do you mean of install via virt env? I’m follow the edX
> Ubuntu 12.04 +64 bit installation guide to install the edX, is that virt
> env?
>
>
> *https://github.com/edx/configuration/wiki/edX-Ubuntu-12.04-64-bit-Installation*
> 
>
>
>
>
> -
>
> root@ethiopia:/edx/app/edxapp/edx-platform/lms/envs# pip install
> django-auth-ldap
>
> Requirement already satisfied (use --upgrade to upgrade): django-auth-ldap
> in /usr/local/lib/python2.7/dist-packages
>
> Requirement already satisfied (use --upgrade to upgrade): django in
> /usr/local/lib/python2.7/dist-packages (from django-auth-ldap)
>
> Requirement already satisfied (use --upgrade to upgrade): python-ldap>=2.0
> in /usr/local/lib/python2.7/dist-packages (from django-auth-ldap)
>
> Requirement already satisfied (use --upgrade to upgrade): setuptools in
> /usr/local/lib/python2.7/dist-packages (from
> python-ldap>=2.0->django-auth-ldap)
>
> Cleaning up...
>
>
>
> Thanks and Regards,
>
> Terence Yip
>
> Lachlan Musicman於 2015年2月24日星期二 UTC+8上午7時15分46秒寫道:
>
>> Sorry, I've been organising a conference and have been awol. I'll be
>> able to take a look next week. But quickly:
>>
>> I don't understand why you have two versions of Django, I would
>> suggest that is an issue.
>>
>> You should be using django-auth-ldap, and that's got Django > 1.3 as a
>> requirement.
>>
>> You shouldn't need to create the %user - that is done automatically by
>> the django-auth-ldap
>>
>> Finally, please please please use a virtual environment. It makes all
>> of this significantly easier - like finding django-auth-ldap is as
>> easy as "pip install django-auth-ldap".
>>
>> It's recommended you don't install via apt-get. While apt-get is easy
>> and centralised, in the case of web apps, I would install via virt env
>> and pip every time.
>>
>> cheers
>> L.
>> --
>> "This is a profound psychological violence here. How can one even
>> begin to speak of dignity in labor when one secretly feels one's job
>> should not exist?"
>>
>> On the Phenomenon of Bullshit Jobs, David Graeber
>> http://strikemag.org/bullshit-jobs/
>>
>>
>> On 23 February 2015 at 19:09, 'Yip Terence' via Django users
>>  wrote:
>> > Hi L,
>> >
>> > Actually, I has been input the LDAP string in
>> > /edx/app/edxapp/edx-platform/lms/envs/common.py.  But there a two
>> problems
>> > after the configuration. Firstly, the script can't get the %user value
>> I
>> > need to hardcode the username / email in the connection string than I
>> can
>> > login to edx.  Secondly, can't to create an user profile when first
>> login.
>> >
>> > Is it need to modify the views.py and urls.py file for collect the
>> %user
>> > value and create the user profile?
>> >
>> >
>> > I have 2 version django in edx.
>> > ./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/
>> lib/Django-1.3/django/bin/django-admin.py
>> > ./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/
>> lib/Django-1.2.5/django/bin/django-admin.py
>> >
>> >
>> > ldap_auth_ldap:
>> > How can I find the version?  I using the apt-get to install the
>> package.
>> >
>> > The search settings.py result.
>> > ---Setttings.py---
>> > ./edx/app/xqueue/xqueue/xqueue/settings.py
>> > ./edx/app/xqueue/venvs/xqueue/lib/python2.7/site-packages/
>> django/conf/project_template/project_name/settings.py
>> > ./edx/app/xqueue/venvs/xqueue/lib/python2.7/site-packages/
>> newrelic-2.18.1.15/newrelic/api/settings.py
>> > ./edx/app/edxapp/edx-platform/common/test/acceptance/pages/studio/settings.py
>>
>> > ./edx/app/edxapp/edx-platform/lms/djangoapps/django_comment_c

Re: Edx LDAP Auth setting

2015-02-23 Thread 'Yip Terence' via Django users
 

Hi L,

 

Thanks for your reply.

 

I’m through pip to install the django-auth-ldap already.  But there are two 
question here. 

1.   How can I check the django-auth-ldap version?

2.   What do you mean of install via virt env? I’m follow the edX 
Ubuntu 12.04 +64 bit installation guide to install the edX, is that virt 
env? 

*https://github.com/edx/configuration/wiki/edX-Ubuntu-12.04-64-bit-Installation*
 


 

-

root@ethiopia:/edx/app/edxapp/edx-platform/lms/envs# pip install 
django-auth-ldap

Requirement already satisfied (use --upgrade to upgrade): django-auth-ldap 
in /usr/local/lib/python2.7/dist-packages

Requirement already satisfied (use --upgrade to upgrade): django in 
/usr/local/lib/python2.7/dist-packages (from django-auth-ldap)

Requirement already satisfied (use --upgrade to upgrade): python-ldap>=2.0 
in /usr/local/lib/python2.7/dist-packages (from django-auth-ldap)

Requirement already satisfied (use --upgrade to upgrade): setuptools in 
/usr/local/lib/python2.7/dist-packages (from 
python-ldap>=2.0->django-auth-ldap)
 
Cleaning up...
 
 

Thanks and Regards,

Terence Yip

Lachlan Musicman於 2015年2月24日星期二 UTC+8上午7時15分46秒寫道:

> Sorry, I've been organising a conference and have been awol. I'll be 
> able to take a look next week. But quickly: 
>
> I don't understand why you have two versions of Django, I would 
> suggest that is an issue. 
>
> You should be using django-auth-ldap, and that's got Django > 1.3 as a 
> requirement. 
>
> You shouldn't need to create the %user - that is done automatically by 
> the django-auth-ldap 
>
> Finally, please please please use a virtual environment. It makes all 
> of this significantly easier - like finding django-auth-ldap is as 
> easy as "pip install django-auth-ldap". 
>
> It's recommended you don't install via apt-get. While apt-get is easy 
> and centralised, in the case of web apps, I would install via virt env 
> and pip every time. 
>
> cheers 
> L. 
> -- 
> "This is a profound psychological violence here. How can one even 
> begin to speak of dignity in labor when one secretly feels one's job 
> should not exist?" 
>
> On the Phenomenon of Bullshit Jobs, David Graeber 
> http://strikemag.org/bullshit-jobs/ 
>
>
> On 23 February 2015 at 19:09, 'Yip Terence' via Django users 
> > wrote: 
> > Hi L, 
> > 
> > Actually, I has been input the LDAP string in 
> > /edx/app/edxapp/edx-platform/lms/envs/common.py.  But there a two 
> problems 
> > after the configuration. Firstly, the script can't get the %user value I 
> > need to hardcode the username / email in the connection string than I 
> can 
> > login to edx.  Secondly, can't to create an user profile when first 
> login. 
> > 
> > Is it need to modify the views.py and urls.py file for collect the %user 
> > value and create the user profile? 
> > 
> > 
> > I have 2 version django in edx. 
> > 
> ./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.3/django/bin/django-admin.py
>  
>
> > 
> ./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.2.5/django/bin/django-admin.py
>  
>
> > 
> > 
> > ldap_auth_ldap: 
> > How can I find the version?  I using the apt-get to install the package. 
> > 
> > The search settings.py result. 
> > ---Setttings.py--- 
> > ./edx/app/xqueue/xqueue/xqueue/settings.py 
> > 
> ./edx/app/xqueue/venvs/xqueue/lib/python2.7/site-packages/django/conf/project_template/project_name/settings.py
>  
>
> > 
> ./edx/app/xqueue/venvs/xqueue/lib/python2.7/site-packages/newrelic-2.18.1.15/newrelic/api/settings.py
>  
>
> > 
> ./edx/app/edxapp/edx-platform/common/test/acceptance/pages/studio/settings.py 
>
> > 
> ./edx/app/edxapp/edx-platform/lms/djangoapps/django_comment_client/settings.py
>  
>
> > ./edx/app/edxapp/edx-platform/lms/lib/comment_client/settings.py 
> > 
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django_countries/tests/settings.py
>  
>
> > 
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/method_override/settings.py
>  
>
> > 
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/example/settings.py 
>
> > 
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django/conf/project_template/project_name/settings.py
>  
>
> > 
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/dealer/contrib/django/settings.py
>  
>
> > 
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/newrelic-2.18.1.15/newrelic/api/settings.py
>  
>
> > 
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django_extensions/settings.py
>  
>
> > 
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/appconf/tests/settings.py
>  
>
> > 
> ./edx/app/edxapp/venvs/edxapp/src/django-pipeline/pipeline/conf/settings.py 
> > ./edx/app/edxapp/venvs/edxapp/src/django-pipeline/tests/settings.py

Re: Edx LDAP Auth setting

2015-02-23 Thread Lachlan Musicman
Sorry, I've been organising a conference and have been awol. I'll be
able to take a look next week. But quickly:

I don't understand why you have two versions of Django, I would
suggest that is an issue.

You should be using django-auth-ldap, and that's got Django > 1.3 as a
requirement.

You shouldn't need to create the %user - that is done automatically by
the django-auth-ldap

Finally, please please please use a virtual environment. It makes all
of this significantly easier - like finding django-auth-ldap is as
easy as "pip install django-auth-ldap".

It's recommended you don't install via apt-get. While apt-get is easy
and centralised, in the case of web apps, I would install via virt env
and pip every time.

cheers
L.
--
"This is a profound psychological violence here. How can one even
begin to speak of dignity in labor when one secretly feels one's job
should not exist?"

On the Phenomenon of Bullshit Jobs, David Graeber
http://strikemag.org/bullshit-jobs/


On 23 February 2015 at 19:09, 'Yip Terence' via Django users
 wrote:
> Hi L,
>
> Actually, I has been input the LDAP string in
> /edx/app/edxapp/edx-platform/lms/envs/common.py.  But there a two problems
> after the configuration. Firstly, the script can't get the %user value I
> need to hardcode the username / email in the connection string than I can
> login to edx.  Secondly, can't to create an user profile when first login.
>
> Is it need to modify the views.py and urls.py file for collect the %user
> value and create the user profile?
>
>
> I have 2 version django in edx.
> ./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.3/django/bin/django-admin.py
> ./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.2.5/django/bin/django-admin.py
>
>
> ldap_auth_ldap:
> How can I find the version?  I using the apt-get to install the package.
>
> The search settings.py result.
> ---Setttings.py---
> ./edx/app/xqueue/xqueue/xqueue/settings.py
> ./edx/app/xqueue/venvs/xqueue/lib/python2.7/site-packages/django/conf/project_template/project_name/settings.py
> ./edx/app/xqueue/venvs/xqueue/lib/python2.7/site-packages/newrelic-2.18.1.15/newrelic/api/settings.py
> ./edx/app/edxapp/edx-platform/common/test/acceptance/pages/studio/settings.py
> ./edx/app/edxapp/edx-platform/lms/djangoapps/django_comment_client/settings.py
> ./edx/app/edxapp/edx-platform/lms/lib/comment_client/settings.py
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django_countries/tests/settings.py
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/method_override/settings.py
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/example/settings.py
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django/conf/project_template/project_name/settings.py
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/dealer/contrib/django/settings.py
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/newrelic-2.18.1.15/newrelic/api/settings.py
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django_extensions/settings.py
> ./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/appconf/tests/settings.py
> ./edx/app/edxapp/venvs/edxapp/src/django-pipeline/pipeline/conf/settings.py
> ./edx/app/edxapp/venvs/edxapp/src/django-pipeline/tests/settings.py
> ./edx/app/edxapp/venvs/edxapp/src/edx-val/edxval/settings.py
> ./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.3/django/conf/project_template/settings.py
> ./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.2.5/django/conf/project_template/settings.py
> ./usr/local/lib/python2.7/dist-packages/django/conf/project_template/project_name/settings.py
>
> Thank you very much for your assistance.
>
> Thanks and Regards,
> Terence Yip
>
> Lachlan Musicman於 2015年2月10日星期二 UTC+8下午12時22分50秒寫道:
>>
>> Yip, EDX looks complex - can you search for the settings file and report
>> back?
>>
>> AuthLDAP is annoying, but it does work - I've used it successfully
>> against an AD backend. The error messages are important to read.
>>
>> But first, find your settings file.
>>
>> You will need to provide us with more info too. What's not working?
>> What have you put into the settings file? What version of django is
>> EDX using, and does django_auth_ldap provide support for that django
>> version, what error messages are you getting? Can you attach to the
>> ldap server from just the django shell (ie, are the username and
>> password etc correct)?
>>
>> cheers
>> L.
>> --
>> "This is a profound psychological violence here. How can one even
>> begin to speak of dignity in labor when one secretly feels one's job
>> should not exist?"
>>
>> On the Phenomenon of Bullshit Jobs, David Graeber
>> http://strikemag.org/bullshit-jobs/
>>
>>
>> On 10 February 2015 at 15:00, 'Yip Terence' via Django users
>>  wrote:
>> > Dear All,
>> >
>> > I have been installed the open edx and django_auth_ldap package
>> > (htt

Re: Edx LDAP Auth setting

2015-02-23 Thread 'Yip Terence' via Django users
Hi L,
 
Actually, I has been input the LDAP string in 
/edx/app/edxapp/edx-platform/lms/envs/common.py.  But there a two 
problems after the configuration. Firstly, the script can't get the 
%user value I need to hardcode the username / email in the connection 
string than I can login to edx.  Secondly, can't to create an user profile 
when first login.
 
Is it need to modify the views.py and urls.py file for collect the %user 
value and create the user profile?
 
 
I have 2 version django in edx.
./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.3/django/bin/django-admin.py
./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.2.5/django/bin/django-admin.py
 
 
ldap_auth_ldap:
How can I find the version?  I using the apt-get to install the package.
 
The search settings.py result.
---Setttings.py---
./edx/app/xqueue/xqueue/xqueue/settings.py
./edx/app/xqueue/venvs/xqueue/lib/python2.7/site-packages/django/conf/project_template/project_name/settings.py
./edx/app/xqueue/venvs/xqueue/lib/python2.7/site-packages/newrelic-2.18.1.15/newrelic/api/settings.py
./edx/app/edxapp/edx-platform/common/test/acceptance/pages/studio/settings.py
./edx/app/edxapp/edx-platform/lms/djangoapps/django_comment_client/settings.py
./edx/app/edxapp/edx-platform/lms/lib/comment_client/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django_countries/tests/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/method_override/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/example/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django/conf/project_template/project_name/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/dealer/contrib/django/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/newrelic-2.18.1.15/newrelic/api/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django_extensions/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/appconf/tests/settings.py
./edx/app/edxapp/venvs/edxapp/src/django-pipeline/pipeline/conf/settings.py
./edx/app/edxapp/venvs/edxapp/src/django-pipeline/tests/settings.py
./edx/app/edxapp/venvs/edxapp/src/edx-val/edxval/settings.py
./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.3/django/conf/project_template/settings.py
./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.2.5/django/conf/project_template/settings.py
./usr/local/lib/python2.7/dist-packages/django/conf/project_template/project_name/settings.py
 
Thank you very much for your assistance.
 
Thanks and Regards,
Terence Yip

Lachlan Musicman於 2015年2月10日星期二 UTC+8下午12時22分50秒寫道:

> Yip, EDX looks complex - can you search for the settings file and report 
> back? 
>
> AuthLDAP is annoying, but it does work - I've used it successfully 
> against an AD backend. The error messages are important to read. 
>
> But first, find your settings file. 
>
> You will need to provide us with more info too. What's not working? 
> What have you put into the settings file? What version of django is 
> EDX using, and does django_auth_ldap provide support for that django 
> version, what error messages are you getting? Can you attach to the 
> ldap server from just the django shell (ie, are the username and 
> password etc correct)? 
>
> cheers 
> L. 
> -- 
> "This is a profound psychological violence here. How can one even 
> begin to speak of dignity in labor when one secretly feels one's job 
> should not exist?" 
>
> On the Phenomenon of Bullshit Jobs, David Graeber 
> http://strikemag.org/bullshit-jobs/ 
>
>
> On 10 February 2015 at 15:00, 'Yip Terence' via Django users 
> > wrote: 
> > Dear All, 
> > 
> > I have been installed the open edx and django_auth_ldap package 
> > (http://code.edx.org/) in our environment.  However, I'm not successful 
> to 
> > config the Auth with LDAP.  Could anyone could provide the guide to me? 
>  I 
> > don't know where is the settings.py file path in open edx. 
> > 
> > Please help. 
> > 
> > Thanks and Regards, 
> > Terence Yip 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Django users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to django-users...@googlegroups.com . 
> > To post to this group, send email to django...@googlegroups.com 
> . 
> > Visit this group at http://groups.google.com/group/django-users. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/django-users/65f0df30-c315-401c-9711-9228779a65ed%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@goog

Re: Edx LDAP Auth setting

2015-02-11 Thread 'Yip Terence' via Django users
Hi L,
 
Actually, I has been input the LDAP string in 
/edx/app/edxapp/edx-platform/lms/envs/common.py.  But there a two 
problems after the configuration. Firstly, the script can't get the 
%user value I need to hardcode the username / email in the connection 
string than I can login to edx.  Secondly, can't to create an user profile 
when first login.
 
Is it need to modify the views.py and urls.py file for collect the %user 
value and create the user profile?
 
 
I have 2 version django in edx.
./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.3/django/bin/django-admin.py
./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.2.5/django/bin/django-admin.py
 
 
ldap_auth_ldap:
How can I find the version?  I using the apt-get to install the package.
 
The search settings.py result.
---Setttings.py---
./edx/app/xqueue/xqueue/xqueue/settings.py
./edx/app/xqueue/venvs/xqueue/lib/python2.7/site-packages/django/conf/project_template/project_name/settings.py
./edx/app/xqueue/venvs/xqueue/lib/python2.7/site-packages/newrelic-2.18.1.15/newrelic/api/settings.py
./edx/app/edxapp/edx-platform/common/test/acceptance/pages/studio/settings.py
./edx/app/edxapp/edx-platform/lms/djangoapps/django_comment_client/settings.py
./edx/app/edxapp/edx-platform/lms/lib/comment_client/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django_countries/tests/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/method_override/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/example/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django/conf/project_template/project_name/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/dealer/contrib/django/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/newrelic-2.18.1.15/newrelic/api/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/django_extensions/settings.py
./edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/appconf/tests/settings.py
./edx/app/edxapp/venvs/edxapp/src/django-pipeline/pipeline/conf/settings.py
./edx/app/edxapp/venvs/edxapp/src/django-pipeline/tests/settings.py
./edx/app/edxapp/venvs/edxapp/src/edx-val/edxval/settings.py
./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.3/django/conf/project_template/settings.py
./edx/app/edxapp/venvs/edxapp/src/lettuce/tests/integration/lib/Django-1.2.5/django/conf/project_template/settings.py
./usr/local/lib/python2.7/dist-packages/django/conf/project_template/project_name/settings.py
 
Thank you very much for your assistance.
 
Thanks and Regards,
Terence Yip

Yip Terence於 2015年2月10日星期二 UTC+8下午12時00分30秒寫道:

> Dear All,
>
> I have been installed the open edx and django_auth_ldap package (
> http://code.edx.org/) in our environment.  However, I'm not successful to 
> config the Auth with LDAP.  Could anyone could provide the guide to me?  I 
> don't know where is the settings.py file path in open edx.
>
> Please help.
>
> Thanks and Regards,
> Terence Yip
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1609da7e-6fec-43f9-bf0d-89761a4c97a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Edx LDAP Auth setting

2015-02-09 Thread Lachlan Musicman
Yip, EDX looks complex - can you search for the settings file and report back?

AuthLDAP is annoying, but it does work - I've used it successfully
against an AD backend. The error messages are important to read.

But first, find your settings file.

You will need to provide us with more info too. What's not working?
What have you put into the settings file? What version of django is
EDX using, and does django_auth_ldap provide support for that django
version, what error messages are you getting? Can you attach to the
ldap server from just the django shell (ie, are the username and
password etc correct)?

cheers
L.
--
"This is a profound psychological violence here. How can one even
begin to speak of dignity in labor when one secretly feels one's job
should not exist?"

On the Phenomenon of Bullshit Jobs, David Graeber
http://strikemag.org/bullshit-jobs/


On 10 February 2015 at 15:00, 'Yip Terence' via Django users
 wrote:
> Dear All,
>
> I have been installed the open edx and django_auth_ldap package
> (http://code.edx.org/) in our environment.  However, I'm not successful to
> config the Auth with LDAP.  Could anyone could provide the guide to me?  I
> don't know where is the settings.py file path in open edx.
>
> Please help.
>
> Thanks and Regards,
> Terence Yip
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/65f0df30-c315-401c-9711-9228779a65ed%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiO8JN2BxGdKvoWhJQ6mrQdQY%2B5tq3AT5Rs6%2BPbJE_QKqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Edx LDAP Auth setting

2015-02-09 Thread 'Yip Terence' via Django users
Dear All,

I have been installed the open edx and django_auth_ldap package 
(http://code.edx.org/) in our environment.  However, I'm not successful to 
config the Auth with LDAP.  Could anyone could provide the guide to me?  I 
don't know where is the settings.py file path in open edx.

Please help.

Thanks and Regards,
Terence Yip

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/65f0df30-c315-401c-9711-9228779a65ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.