Thread:Extension talk:LDAP Authentication/Creation and modification of users in LDAP/reply (3)

Hello, I ve found inetOrgPerson and i managed to create a new user : when i create a new account in my wiki the new user is automatically add in LDAP. But i've a new problem, when i try to authenticate with a user who is in LDAP but not in the wiki, the creation of a new account don't work any more (before it worked)

my LocalSettings.php
require_once( "extensions/ScriptManager/SM_Initialize.php" ); require_once( "$IP/extensions/LDAP/LdapAuthentication.php" ); $wgAuth = new LdapAuthenticationPlugin; $wgLDAPDomainNames = array( "LOCALLDAP" ); $wgLDAPServerNames = array( "LOCALLDAP"=>"localhost" ); $wgLDAPUseLocal = true; $wgLDAPEncryptionType = array( "LOCALLDAP"=>"clear" ); $wgLDAPPort = array("LOCALLDAP"=>389); $wgLDAPSearchStrings = array( "LOCALLDAP"=>"cn=USER-NAME,ou=Utilisateurs,ou=Personnes,dc=my-domain,dc=com"); $wgLDAPGroupNameAttribute = array("LOCALLDAP"=>"cn"); $wgLDAPUserBaseDNs = array("LOCALLDAP"=>"ou=Utilisateurs,ou=Personnes,dc=my-domain,dc=com"); $wgLDAPDisableAutoCreate = array("LOCALLDAP"=>false); $wgMinimalPasswordLength = 1; $wgLDAPDebug = 3; $wgDebugLogFile = "C:\log.txt"; $wgLDAPBaseDNs = array("LOCALLDAP" => "dc=my-domain,dc=com" ); $wgDebugLogGroups["ldap"] = "/tmp/debug.log" ; $wgLDAPGroupBaseDNs = array( "LOCALLDAP"=>"ou=Groupes,dc=my-domain,dc=com" ); $wgUseLDAP = true; $wgLDAPWriterDN = array("LOCALLDAP"=>"cn=Eva,ou=Utilisateurs,ou=Personnes,dc=my-domain,dc=com"); $wgLDAPWriterPassword = array("LOCALLDAP"=>"a190504"); $wgLDAPWriteLocation = array("LOCALLDAP"=>"ou=Utilisateurs,ou=Personnes,dc=my-domain,dc=com"); $wgLDAPAddLDAPUsers = array("LOCALLDAP"=>true); $wgLDAPUpdateLDAP = array("LOCALLDAP"=>true); $wgLDAPPasswordHash = array("LOCALLDAP"=>"clear"); $wgLDAPPreferences = array("LOCALLDAP"=>array( "nickname"=>"cn")); $wgLDAPRetrievePrefs = array( "LOCALLDAP" => true );

Debug.log
When i create a new account in the wiki (a user who doesn't exist in LDAP) 2010-07-08 06:36:19 bd_mediawiki: Entering validDomain 2010-07-08 06:36:19 bd_mediawiki: User is not using a valid domain. 2010-07-08 06:36:19 bd_mediawiki: Setting domain as: invaliddomain 2010-07-08 06:36:19 bd_mediawiki: Entering allowPasswordChange 2010-07-08 06:36:19 bd_mediawiki: Entering modifyUITemplate 2010-07-08 06:36:19 bd_mediawiki: Allowing the local domain, adding it to the list. 2010-07-08 06:36:21 bd_mediawiki: Entering validDomain 2010-07-08 06:36:21 bd_mediawiki: User is not using a valid domain. 2010-07-08 06:36:21 bd_mediawiki: Setting domain as: invaliddomain 2010-07-08 06:36:21 bd_mediawiki: Entering allowPasswordChange 2010-07-08 06:36:21 bd_mediawiki: Entering modifyUITemplate 2010-07-08 06:36:21 bd_mediawiki: Allowing the local domain, adding it to the list. 2010-07-08 06:36:35 bd_mediawiki: Entering validDomain 2010-07-08 06:36:35 bd_mediawiki: User is using a valid domain. 2010-07-08 06:36:35 bd_mediawiki: Setting domain as: LOCALLDAP 2010-07-08 06:36:35 bd_mediawiki: Entering validDomain 2010-07-08 06:36:35 bd_mediawiki: User is using a valid domain. 2010-07-08 06:36:35 bd_mediawiki: Entering getCanonicalName 2010-07-08 06:36:35 bd_mediawiki: Username isn't empty. 2010-07-08 06:36:35 bd_mediawiki: Munged username: New 2010-07-08 06:36:35 bd_mediawiki: Entering addUser 2010-07-08 06:36:35 bd_mediawiki: Entering getPasswordHash 2010-07-08 06:36:35 bd_mediawiki: Entering Connect 2010-07-08 06:36:35 bd_mediawiki: Using TLS or not using encryption. 2010-07-08 06:36:35 bd_mediawiki: Using non-standard port: 389 2010-07-08 06:36:35 bd_mediawiki: Using servers:  ldap://localhost:389 2010-07-08 06:36:35 bd_mediawiki: Successfully connected 2010-07-08 06:36:35 bd_mediawiki: Entering getSearchString 2010-07-08 06:36:35 bd_mediawiki: Doing a straight bind 2010-07-08 06:36:35 bd_mediawiki: userdn is: cn=New,ou=Utilisateurs,ou=Personnes,dc=my-domain,dc=com 2010-07-08 06:36:35 bd_mediawiki: Binding as the writerDN 2010-07-08 06:36:35 bd_mediawiki: Adding user 2010-07-08 06:36:35 bd_mediawiki: Successfully added user 2010-07-08 06:36:35 bd_mediawiki: Entering allowPasswordChange 2010-07-08 06:36:35 bd_mediawiki: Entering allowPasswordChange 2010-07-08 06:36:35 bd_mediawiki: Entering setPassword 2010-07-08 06:36:35 bd_mediawiki: Entering getPasswordHash 2010-07-08 06:36:35 bd_mediawiki: Entering Connect 2010-07-08 06:36:35 bd_mediawiki: Using TLS or not using encryption. 2010-07-08 06:36:35 bd_mediawiki: Using non-standard port: 389 2010-07-08 06:36:35 bd_mediawiki: Using servers:  ldap://localhost:389 2010-07-08 06:36:35 bd_mediawiki: Connected successfully 2010-07-08 06:36:35 bd_mediawiki: Entering getSearchString 2010-07-08 06:36:35 bd_mediawiki: Doing a straight bind 2010-07-08 06:36:35 bd_mediawiki: userdn is: cn=New,ou=Utilisateurs,ou=Personnes,dc=my-domain,dc=com 2010-07-08 06:36:35 bd_mediawiki: Binding as the writerDN 2010-07-08 06:36:35 bd_mediawiki: Successfully modified the user's password 2010-07-08 06:36:35 bd_mediawiki: Entering initUser 2010-07-08 06:36:35 bd_mediawiki: Entering updateUser 2010-07-08 06:36:35 bd_mediawiki: Setting user preferences. 2010-07-08 06:36:35 bd_mediawiki: Saving user settings.

when i try to log with a AD user who has no account in the wiki 2010-07-08 06:37:44 bd_mediawiki: Entering validDomain 2010-07-08 06:37:44 bd_mediawiki: User is not using a valid domain. 2010-07-08 06:37:44 bd_mediawiki: Setting domain as: invaliddomain 2010-07-08 06:37:44 bd_mediawiki: Entering allowPasswordChange 2010-07-08 06:37:44 bd_mediawiki: Entering modifyUITemplate 2010-07-08 06:37:44 bd_mediawiki: Allowing the local domain, adding it to the list. 2010-07-08 06:37:53 bd_mediawiki: Entering validDomain 2010-07-08 06:37:53 bd_mediawiki: User is using a valid domain. 2010-07-08 06:37:53 bd_mediawiki: Setting domain as: LOCALLDAP 2010-07-08 06:37:53 bd_mediawiki: Entering getCanonicalName 2010-07-08 06:37:53 bd_mediawiki: Username isn't empty. 2010-07-08 06:37:53 bd_mediawiki: Munged username: User2 2010-07-08 06:37:53 bd_mediawiki: Entering userExists 2010-07-08 06:37:53 bd_mediawiki: Entering Connect 2010-07-08 06:37:53 bd_mediawiki: Using TLS or not using encryption. 2010-07-08 06:37:53 bd_mediawiki: Using non-standard port: 389 2010-07-08 06:37:53 bd_mediawiki: Using servers:  ldap://localhost:389 2010-07-08 06:37:53 bd_mediawiki: Failed to connect 2010-07-08 06:37:53 bd_mediawiki: Entering allowPasswordChange 2010-07-08 06:37:53 bd_mediawiki: Entering modifyUITemplate 2010-07-08 06:37:53 bd_mediawiki: Allowing the local domain, adding it to the list.

I don't know why the connection can't perform

thanks for your help