HowToUseIt Wiki page commented on by cveneris
- This is very interesting.
This is very interesting.
Earlier this year
Nov 23, 2009
issue 19
(Password Sync from Active Directory) reported by rvbhavsar
- This is a Question , Whether this tool will sync Active Directory Passwords.
Please confirm,
Regards,
Rahul
rahul@evyse.com
This is a Question , Whether this tool will sync Active Directory Passwords.
Please confirm,
Regards,
Rahul
rahul@evyse.com
Mar 11, 2009
issue 18
(TypeError: an integer is required) reported by Jack.Singh.FDU
- We have a non regular class its a derived class from organizationalPerson,
i tried to set a limit to see a max 100 users but the sync_ldap crashes, i
have the debug output.
Command: set ldap_page_size 100
Command: testFilter
Traceback (most recent call last):
File "./sync_ldap.py", line 183, in ?
(config, ldap_context, user_database, google_context, log_config) = \
File "./sync_ldap.py", line 112, in DoMain
cmd.cmdloop()
File "/usr/lib/python2.4/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/usr/lib/python2.4/cmd.py", line 219, in onecmd
return func(arg)
File "/usr/local/adm/arc/google-apps-ldap-sync/commands.py", line 186, in
do_testFilter
self.new_users = self.ldap_context.Search(attrlist=['cn'])
File "/usr/local/adm/arc/google-apps-ldap-sync/ldap_ctxt.py", line 299,
in Search
users = self._PagedAsyncSearch(query, sizelimit, attrlist=attrlist)
File "/usr/local/adm/arc/google-apps-ldap-sync/ldap_ctxt.py", line 249,
in _PagedAsyncSearch
query, attrlist=attrlist, serverctrls=serverctrls)
File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 468, in
search_ext
EncodeControlTuples(serverctrls),
File "/usr/lib/python2.4/site-packages/ldap/controls.py", line 93, in
EncodeControlTuples
result = [
File "/usr/lib/python2.4/site-packages/ldap/controls.py", line 45, in
getEncodedTuple
return
(self.controlType,self.criticality,self.encodeControlValue(self.controlValue))
File "/usr/lib/python2.4/site-packages/ldap/controls.py", line 78, in
encodeControlValue
return _ldap.encode_page_control(size,cookie)
TypeError: an integer is required
What steps will reproduce the problem?
1. set ldap_page_size 1000
2.
3.
What is the expected output? What do you see instead?
Expected output is to see the app connect successfully but it doesn't it fails.
What version of the product are you using? On what operating system?
Redhat AS 5
Copyright 2006, Google, Inc.
All Rights Reserved.
sync_ldap.py 0.9
Please provide any additional information below.
We have a non regular class its a derived class from organizationalPerson,
i tried to set a limit to see a max 100 users but the sync_ldap crashes, i
have the debug output.
Command: set ldap_page_size 100
Command: testFilter
Traceback (most recent call last):
File "./sync_ldap.py", line 183, in ?
(config, ldap_context, user_database, google_context, log_config) = \
File "./sync_ldap.py", line 112, in DoMain
cmd.cmdloop()
File "/usr/lib/python2.4/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/usr/lib/python2.4/cmd.py", line 219, in onecmd
return func(arg)
File "/usr/local/adm/arc/google-apps-ldap-sync/commands.py", line 186, in
do_testFilter
self.new_users = self.ldap_context.Search(attrlist=['cn'])
File "/usr/local/adm/arc/google-apps-ldap-sync/ldap_ctxt.py", line 299,
in Search
users = self._PagedAsyncSearch(query, sizelimit, attrlist=attrlist)
File "/usr/local/adm/arc/google-apps-ldap-sync/ldap_ctxt.py", line 249,
in _PagedAsyncSearch
query, attrlist=attrlist, serverctrls=serverctrls)
File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 468, in
search_ext
EncodeControlTuples(serverctrls),
File "/usr/lib/python2.4/site-packages/ldap/controls.py", line 93, in
EncodeControlTuples
result = [
File "/usr/lib/python2.4/site-packages/ldap/controls.py", line 45, in
getEncodedTuple
return
(self.controlType,self.criticality,self.encodeControlValue(self.controlValue))
File "/usr/lib/python2.4/site-packages/ldap/controls.py", line 78, in
encodeControlValue
return _ldap.encode_page_control(size,cookie)
TypeError: an integer is required
What steps will reproduce the problem?
1. set ldap_page_size 1000
2.
3.
What is the expected output? What do you see instead?
Expected output is to see the app connect successfully but it doesn't it fails.
What version of the product are you using? On what operating system?
Redhat AS 5
Copyright 2006, Google, Inc.
All Rights Reserved.
sync_ldap.py 0.9
Please provide any additional information below.
issue 17
(Getting Error - No Module Named _ldap) reported by vishal78
- What steps will reproduce the problem?
What is the expected output? What do you see instead?
C:\google\gldap-sync>python sync_ldap.py
Traceback (most recent call last):
File "sync_ldap.py", line 38, in <module>
import ldap_ctxt
File "C:\google\gldap-sync\ldap_ctxt.py", line 27, in <module>
import ldap
File "C:\google\python-ldap\Lib\ldap\__init__.py", line 22, in <module>
from _ldap import *
ImportError: No module named _ldap
What version of the product are you using? On what operating system?
Using Windows Server 2003. I am using Python 2.6. Its installed under my
folder c:\python. I have installed all the google related tools under -
c:\google\gldap-sync
c:\google\python-api
c:\google\python-ldap
this is my PYTHONPATH =
C:\google\python-api;C:\google\python-ldap\Lib;C:\python\Lib;C:\python\libs;C:\google\python-ldap
Please provide any additional information below.
What steps will reproduce the problem?
What is the expected output? What do you see instead?
C:\google\gldap-sync>python sync_ldap.py
Traceback (most recent call last):
File "sync_ldap.py", line 38, in <module>
import ldap_ctxt
File "C:\google\gldap-sync\ldap_ctxt.py", line 27, in <module>
import ldap
File "C:\google\python-ldap\Lib\ldap\__init__.py", line 22, in <module>
from _ldap import *
ImportError: No module named _ldap
What version of the product are you using? On what operating system?
Using Windows Server 2003. I am using Python 2.6. Its installed under my
folder c:\python. I have installed all the google related tools under -
c:\google\gldap-sync
c:\google\python-api
c:\google\python-ldap
this is my PYTHONPATH =
C:\google\python-api;C:\google\python-ldap\Lib;C:\python\Lib;C:\python\libs;C:\google\python-ldap
Please provide any additional information below.
issue 16
(Operations against Active Directory fail due to default refe...) commented on by bobrich
- Oops, additional bind was for testing. This is the correct patch..
diff -u orig/ldap_ctxt.py new/ldap_ctxt.py
--- orig/ldap_ctxt.py 2008-06-24 20:53:52.000000000 -0400
+++ new/ldap_ctxt.py 2008-08-19 18:50:44.000000000 -0400
@@ -62,6 +62,7 @@
'ldap_base_dn': messages.MSG_LDAP_BASE_DN,
'ldap_timeout': messages.MSG_LDAP_TIMEOUT,
'ldap_page_size': messages.MSG_LDAP_PAGE_SIZE,
+ 'ldap_follow_referrals': messages.MSG_LDAP_FOLLOW_REFERRALS,
'tls_option': messages.MSG_TLS_OPTION,
'tls_cacertdir': messages.MSG_TLS_CACERTDIR,
'tls_cacertfile': messages.MSG_TLS_CACERTFILE}
@@ -80,6 +81,7 @@
self.ldap_timeout = TIMEOUT_SECS
self.ldap_url = None
self.ldap_page_size = 0
+ self.ldap_follow_referrals = 'false'
self.tls_option = 'never'
self.tls_cacertdir = '/etc/ssl/certs'
self.tls_cacertfile = ''
@@ -91,6 +93,10 @@
self._required_config = ['ldap_url', 'ldap_user_filter', 'ldap_base_dn']
self.config_changed = False
self.conn = None
+ if self.ldap_follow_referrals == 'true':
+ ldap.set_option(ldap.OPT_REFERRALS, 1)
+ else:
+ ldap.set_option(ldap.OPT_REFERRALS, 0)
if self.tls_option == 'demand':
ldap.set_option(ldap.OPT_X_TLS, ldap.OPT_X_TLS_DEMAND)
elif self.tls_option == 'allow':
diff -u orig/messages.py new/messages.py
--- orig/messages.py 2007-12-14 18:38:38.000000000 -0500
+++ new/messages.py 2008-08-19 18:44:38.000000000 -0400
@@ -157,6 +157,8 @@
MSG_LDAP_URL = "URL for your LDAP server."
+MSG_LDAP_FOLLOW_REFERRALS = "Set to 'true' if LDAP referrals should be followed.
Defaults to false"
+
MSG_LDAP_PAGE_SIZE = """Some ldap servers (like Active Directory) will return
only a limited number of responses to a query and require the ldap client
to request more on subsequent requests. If you have such a server, set this to
Oops, additional bind was for testing. This is the correct patch..
diff -u orig/ldap_ctxt.py new/ldap_ctxt.py
--- orig/ldap_ctxt.py 2008-06-24 20:53:52.000000000 -0400
+++ new/ldap_ctxt.py 2008-08-19 18:50:44.000000000 -0400
@@ -62,6 +62,7 @@
'ldap_base_dn': messages.MSG_LDAP_BASE_DN,
'ldap_timeout': messages.MSG_LDAP_TIMEOUT,
'ldap_page_size': messages.MSG_LDAP_PAGE_SIZE,
+ 'ldap_follow_referrals': messages.MSG_LDAP_FOLLOW_REFERRALS,
'tls_option': messages.MSG_TLS_OPTION,
'tls_cacertdir': messages.MSG_TLS_CACERTDIR,
'tls_cacertfile': messages.MSG_TLS_CACERTFILE}
@@ -80,6 +81,7 @@
self.ldap_timeout = TIMEOUT_SECS
self.ldap_url = None
self.ldap_page_size = 0
+ self.ldap_follow_referrals = 'false'
self.tls_option = 'never'
self.tls_cacertdir = '/etc/ssl/certs'
self.tls_cacertfile = ''
@@ -91,6 +93,10 @@
self._required_config = ['ldap_url', 'ldap_user_filter', 'ldap_base_dn']
self.config_changed = False
self.conn = None
+ if self.ldap_follow_referrals == 'true':
+ ldap.set_option(ldap.OPT_REFERRALS, 1)
+ else:
+ ldap.set_option(ldap.OPT_REFERRALS, 0)
if self.tls_option == 'demand':
ldap.set_option(ldap.OPT_X_TLS, ldap.OPT_X_TLS_DEMAND)
elif self.tls_option == 'allow':
diff -u orig/messages.py new/messages.py
--- orig/messages.py 2007-12-14 18:38:38.000000000 -0500
+++ new/messages.py 2008-08-19 18:44:38.000000000 -0400
@@ -157,6 +157,8 @@
MSG_LDAP_URL = "URL for your LDAP server."
+MSG_LDAP_FOLLOW_REFERRALS = "Set to 'true' if LDAP referrals should be followed.
Defaults to false"
+
MSG_LDAP_PAGE_SIZE = """Some ldap servers (like Active Directory) will return
only a limited number of responses to a query and require the ldap client
to request more on subsequent requests. If you have such a server, set this to
Aug 19, 2008
issue 16
(Operations against Active Directory fail due to default refe...) reported by bobrich
- What steps will reproduce the problem?
1. Configure sync_ldap.py to operate against an AD domain
2. Witness the following error
This is due to AD sending a referral after the results, and python-ldap
following those referrals by default. The following patch resolves the
issue, although i'm not 100% the integration with the config code is correct.
diff -u orig/ldap_ctxt.py new/ldap_ctxt.py
--- orig/ldap_ctxt.py 2008-06-24 20:53:52.000000000 -0400
+++ new/ldap_ctxt.py 2008-08-19 18:44:26.000000000 -0400
@@ -62,6 +62,7 @@
'ldap_base_dn': messages.MSG_LDAP_BASE_DN,
'ldap_timeout': messages.MSG_LDAP_TIMEOUT,
'ldap_page_size': messages.MSG_LDAP_PAGE_SIZE,
+ 'ldap_follow_referrals': messages.MSG_LDAP_FOLLOW_REFERRALS,
'tls_option': messages.MSG_TLS_OPTION,
'tls_cacertdir': messages.MSG_TLS_CACERTDIR,
'tls_cacertfile': messages.MSG_TLS_CACERTFILE}
@@ -80,6 +81,7 @@
self.ldap_timeout = TIMEOUT_SECS
self.ldap_url = None
self.ldap_page_size = 0
+ self.ldap_follow_referrals = 'false'
self.tls_option = 'never'
self.tls_cacertdir = '/etc/ssl/certs'
self.tls_cacertfile = ''
@@ -91,6 +93,10 @@
self._required_config = ['ldap_url', 'ldap_user_filter', 'ldap_base_dn']
self.config_changed = False
self.conn = None
+ if self.ldap_follow_referrals == 'true':
+ ldap.set_option(ldap.OPT_REFERRALS, 1)
+ else:
+ ldap.set_option(ldap.OPT_REFERRALS, 0)
if self.tls_option == 'demand':
ldap.set_option(ldap.OPT_X_TLS, ldap.OPT_X_TLS_DEMAND)
elif self.tls_option == 'allow':
@@ -292,6 +298,8 @@
raise RuntimeError('Not connected')
self.conn.network_timeout = self.ldap_timeout
+ self.conn.bind_s(self.ldap_admin_name, self.ldap_password,
+ ldap.AUTH_SIMPLE)
users = None
try:
diff -u orig/messages.py new/messages.py
--- orig/messages.py 2007-12-14 18:38:38.000000000 -0500
+++ new/messages.py 2008-08-19 18:44:38.000000000 -0400
@@ -157,6 +157,8 @@
MSG_LDAP_URL = "URL for your LDAP server."
+MSG_LDAP_FOLLOW_REFERRALS = "Set to 'true' if LDAP referrals should be
followed. Defaults to false"
+
MSG_LDAP_PAGE_SIZE = """Some ldap servers (like Active Directory) will return
only a limited number of responses to a query and require the ldap client
to request more on subsequent requests. If you have such a server, set
this to
What steps will reproduce the problem?
1. Configure sync_ldap.py to operate against an AD domain
2. Witness the following error
This is due to AD sending a referral after the results, and python-ldap
following those referrals by default. The following patch resolves the
issue, although i'm not 100% the integration with the config code is correct.
diff -u orig/ldap_ctxt.py new/ldap_ctxt.py
--- orig/ldap_ctxt.py 2008-06-24 20:53:52.000000000 -0400
+++ new/ldap_ctxt.py 2008-08-19 18:44:26.000000000 -0400
@@ -62,6 +62,7 @@
'ldap_base_dn': messages.MSG_LDAP_BASE_DN,
'ldap_timeout': messages.MSG_LDAP_TIMEOUT,
'ldap_page_size': messages.MSG_LDAP_PAGE_SIZE,
+ 'ldap_follow_referrals': messages.MSG_LDAP_FOLLOW_REFERRALS,
'tls_option': messages.MSG_TLS_OPTION,
'tls_cacertdir': messages.MSG_TLS_CACERTDIR,
'tls_cacertfile': messages.MSG_TLS_CACERTFILE}
@@ -80,6 +81,7 @@
self.ldap_timeout = TIMEOUT_SECS
self.ldap_url = None
self.ldap_page_size = 0
+ self.ldap_follow_referrals = 'false'
self.tls_option = 'never'
self.tls_cacertdir = '/etc/ssl/certs'
self.tls_cacertfile = ''
@@ -91,6 +93,10 @@
self._required_config = ['ldap_url', 'ldap_user_filter', 'ldap_base_dn']
self.config_changed = False
self.conn = None
+ if self.ldap_follow_referrals == 'true':
+ ldap.set_option(ldap.OPT_REFERRALS, 1)
+ else:
+ ldap.set_option(ldap.OPT_REFERRALS, 0)
if self.tls_option == 'demand':
ldap.set_option(ldap.OPT_X_TLS, ldap.OPT_X_TLS_DEMAND)
elif self.tls_option == 'allow':
@@ -292,6 +298,8 @@
raise RuntimeError('Not connected')
self.conn.network_timeout = self.ldap_timeout
+ self.conn.bind_s(self.ldap_admin_name, self.ldap_password,
+ ldap.AUTH_SIMPLE)
users = None
try:
diff -u orig/messages.py new/messages.py
--- orig/messages.py 2007-12-14 18:38:38.000000000 -0500
+++ new/messages.py 2008-08-19 18:44:38.000000000 -0400
@@ -157,6 +157,8 @@
MSG_LDAP_URL = "URL for your LDAP server."
+MSG_LDAP_FOLLOW_REFERRALS = "Set to 'true' if LDAP referrals should be
followed. Defaults to false"
+
MSG_LDAP_PAGE_SIZE = """Some ldap servers (like Active Directory) will return
only a limited number of responses to a query and require the ldap client
to request more on subsequent requests. If you have such a server, set
this to
Jul 31, 2008
r100
(Add back a file deleted mistakenly
) committed by RobertEscorcio
- Add back a file deleted mistakenly
Add back a file deleted mistakenly
Jul 31, 2008
r99
(Add back a file deleted mistakenly
) committed by RobertEscorcio
- Add back a file deleted mistakenly
issue 15
(missing google_result_queue) reported by joe.slag
- What steps will reproduce the problem?
1. download trunk (was r96) according to instructions at
http://code.google.com/p/google-apps-for-your-domain-ldap-sync/
2. run `python sync_ldap.py`
What is the expected output? What do you see instead?
Expected to see something like:
Copyright 2006, Google, Inc.
All Rights Reserved.
Command:
instead:
$ python sync_ldap.py
Traceback (most recent call last):
File "sync_ldap.py", line 44, in <module>
import sync_google
File "/Users/joe/google-apps-for-your-domain-ldap-sync/sync_google.py",
line 35, in <module>
import google_result_queue
ImportError: No module named google_result_queue
What version of the product are you using? On what operating system?
$ svn info
Path: .
URL: http://google-apps-for-your-domain-ldap-sync.googlecode.com/svn/trunk
Repository Root:
http://google-apps-for-your-domain-ldap-sync.googlecode.com/svn
Repository UUID: 3138a281-5f33-0410-9cd3-d9e6c97ba8da
Revision: 96
Node Kind: directory
Schedule: normal
Last Changed Author: RobertEscorcio
Last Changed Rev: 96
Last Changed Date: 2008-07-24 11:43:49 -0400 (Thu, 24 Jul 2008)
Running on OS X 10.5.4
What steps will reproduce the problem?
1. download trunk (was r96) according to instructions at
http://code.google.com/p/google-apps-for-your-domain-ldap-sync/
2. run `python sync_ldap.py`
What is the expected output? What do you see instead?
Expected to see something like:
Copyright 2006, Google, Inc.
All Rights Reserved.
Command:
instead:
$ python sync_ldap.py
Traceback (most recent call last):
File "sync_ldap.py", line 44, in <module>
import sync_google
File "/Users/joe/google-apps-for-your-domain-ldap-sync/sync_google.py",
line 35, in <module>
import google_result_queue
ImportError: No module named google_result_queue
What version of the product are you using? On what operating system?
$ svn info
Path: .
URL: http://google-apps-for-your-domain-ldap-sync.googlecode.com/svn/trunk
Repository Root:
http://google-apps-for-your-domain-ldap-sync.googlecode.com/svn
Repository UUID: 3138a281-5f33-0410-9cd3-d9e6c97ba8da
Revision: 96
Node Kind: directory
Schedule: normal
Last Changed Author: RobertEscorcio
Last Changed Rev: 96
Last Changed Date: 2008-07-24 11:43:49 -0400 (Thu, 24 Jul 2008)
Running on OS X 10.5.4
Jul 24, 2008
r96
(Fix some problems with syncing files up to the trunk
) committed by RobertEscorcio
- Fix some problems with syncing files up to the trunk
Fix some problems with syncing files up to the trunk
Jul 24, 2008
r95
(Fix some problems with syncing files up to the trunk
) committed by RobertEscorcio
- Fix some problems with syncing files up to the trunk
Fix some problems with syncing files up to the trunk