2013-03-04 32 views
0

我試圖連接MoinMoin與我的AD服務器,但它不起作用。我的意思是,我嘗試使用我的域帳戶登錄,但沒有收到任何錯誤(如果我嘗試使用先前創建的超級用戶帳戶登錄,則會出現用戶名或密碼錯誤的錯誤),但我不是登錄。如果我遵循MoinMoin/auth/ldap_login.py的代碼,我已擁有正確的憑據。我是否以正確的方式進行設置?我在FreeBSD 9.1上使用MoinMoin 1.9.6和python 2.7,沒有安裝MoinMoin(即我只從壓縮文件中提取文件並運行wikiserver.py)。與MoinMoin Ldap(AD)身份驗證不起作用

在這裏,我告訴你我的wikiconfig_local.py:

from wikiconfig import LocalConfig 
from MoinMoin.auth.ldap_login import LDAPAuth 

class Config(LocalConfig): 
    superuser=[u"IshayahuLastov",] 
    page_front_page=u"MyWiki" 
    ldap_authenticator1 = LDAPAuth(
     server_uri='ldap://192.168.1.9', 
     bind_dn='[email protected]', 
     bind_pw = 'mypassword', 
     base_dn='dc=meoc,dc=mjcc,dc=local', 
     scope=2, # scope of the search we do (2 == ldap.SCOPE_SUBTREE) 
     referrals=0, # LDAP REFERRALS (0 needed for AD) 
     search_filter='(sAMAccountName=%(username)s)' 
     givenname_attribute=None, 
     surname_attribute=None, 
     aliasname_attribute=None, 
     email_attribute=None, 
     email_callback=None, 
     coding='utf-8', 
     timeout=10, 
     start_tls=0, 
     tls_cacertdir='', 
     tls_cacertfile='', 
     tls_certfile='', 
     tls_keyfile='', 
     tls_require_cert=0, 
     bind_once=False, 
     ) 
    auth = [ldap_authenticator1, ] 
    cookie_lifetime = 1 # 1 hour after last access ldap login is required again 
    user_autocreate = True 

回答

0

有可能有毛病你給LDAPAuth值()。

要進行調試,啓用MoinMoin.auth的調試日誌記錄很有幫助(請參閱moin下載歸檔中包含的日誌記錄配置示例)。

你也可以嘗試使用類似參數的ldapsearch命令行工具,只是爲了檢查如何讓它工作。

+0

與同配置AD認證工作在moinmoin2)) – Ishayahu 2013-03-14 11:32:03

1

如果使用AD,使用 '(UID =%(用戶名)S)',而不是search_filter = '(sAMAccountName賦=%(用戶名)S)' 告訴