![mediawiki: Erro de autenticação LDAP](https://rvso.com/image/1419594/mediawiki%3A%20Erro%20de%20autentica%C3%A7%C3%A3o%20LDAP.png)
estou usando, php5+mysql+ldap . eu configurei php e mysql com mediawiki. está funcionando bem. Mas eu quero fornecer login de autenticação de usuários LDAP e também login de usuários gerais.
eu instalei o módulo ldapauthentication de página de autenticação ldapauthentication do wiki de mídia
A situação atual é geral, posso criar uma conta no meu mediawiki, mas como os usuários ldap não conseguem criar.
Aqui estou fornecendo Localsettings.php.
######### edited by RAMKEE ################
require_once( "$IP/extensions/Ldapauthentication/LdapAuthentication.php" );
$wgAuth = new LdapAuthenticationPlugin();
//require_once( "$IP/extensions/Ldapauthentication/LdapAutoAuthentication.php" );
//AutoAuthSetup();
# End of automatically generated settings.
# Add more configuration options below.
$wgLDAPDomainNames = array(
'testADdomain',''
);
$wgLDAPServerNames = array(
'testADdomain' => 'polyproxy.ramkee.local',''
);
$wgLDAPUseLocal = true;
$wgLDAPEncryptionType = array(
'testADdomain' => 'clear',''
);
$wgLDAPOptions = array(
'testADdomain' => array( LDAP_OPT_DEREF, 1)
);
$wgLDAPPort = array(
'testADdomain' => 389,''
);
$wgLDAPSearchStrings = array(
'testADdomain' => 'uid=USER-NAME,ou=people,dc=ramkee,dc=local'.''
);
$wgLDAPSearchAttributes = array(
'testADdomain' => 'uid'
);
$wgLDAPBaseDNs = array(
'testADdomain' => 'dc=LDAP,dc=ramkee,dc=local'
);
$wgLDAPGroupBaseDNs = array(
'testADdomain' => 'ou=group,dc=ramkee,dc=local'
);
$wgLDAPUserBaseDNs = array(
'testADdomain' => 'ou=people,dc=ramkee,dc=local'
);
$wgLDAPWriterDN = array(
'testADdomain' => 'ou=people,dc=ramkee,dc=local'
);
$wgLDAPWriterPassword = array(
'testADdomain' => 'KnfMdMI0qiH9HZBQw7JkqLyEni/wp34x'
);
$wgLDAPWriteLocation = array(
'testADdomain' => 'ou=people,dc=ramkee,dc=local'
);
$wgLDAPAddLDAPUsers = array(
'testADdomain' => true
);
$wgLDAPUpdateLDAP = array(
'testADdomain' => true
);
$wgLDAPRetrievePrefs = array(
'testADdomain' => true
);
$wgLDAPDisableAutoCreate = array(
'testADdomain' => false
);
$wgLDAPDebug = 10000;
$wgMinimalPasswordLength = 1;
$wgLDAPGroupUseFullDN = array( 'testADdomain' => false );
$wgLDAPLowerCaseUsername = array(
'testADdomain' => true
);
$wgLDAPGroupObjectclass = array(
'testADdomain' => 'groupofuniquenames'
);
$wgLDAPGroupUseRetrievedUsername = array( 'testADdomain' => false
);
$wgLDAPGroupNameAttribute = array(
'testADdomain' => 'cn'
);
$wgLDAPGroupsUseMemberOf = array(
'testADdomain' => false
);
$wgLDAPUseLDAPGroups = array(
'testADdomain' => true
);
$wgLDAPGroupsPrevail = array(
'testADdomain' => true
);
#wgLDAPRequiredGroups = array(
# 'testADdomain' => array(
# 'cn=admin,ou=groups,dc=ramkee,dc=local',
# 'cn=chulbul,ou=people,dc=ramkee,dc=local'
# )
#;
sempre que tento criar uma conta para ldap, isso mostra que você não tem direitos para atualizar o banco de dados (meu banco de dados é mysql) durante a criação da conta, estou recebendo o seguinte erro
e ao fazer login como administrador ele está aceitando (o administrador não está no LDAP)
meu ldap também está funcionando, a porta 389 está aberta e ldapsearch -x também está funcionando. Mas não sei onde cometi um erro. um administrador pode fazer login, usuários em geral também não conseguem fazer login. estou lutando nos últimos 3 dias. Alguém pode me ajudar
Responder1
Eu me encontrei onde cometi um erro, aqui estou fornecendo meu localsettings.php. se alguém precisar, siga isto, você pode ter sucesso
após a criação de uma página mediawiki bem-sucedida, você obterá localsettings.php novo. nisso basta adicionar as seguintes linhas. então você será autenticado em seu banco de dados LDAP.
Aqueles que estão no banco de dados LDAP não precisam criar uma conta em nosso mediawiki, podem fazer login diretamente sem criar uma conta wiki.
ramkee.localémeu nome de domínio.poliproxy.ramkee.localé o nome do meu servidor LDAP
require_once 'extensions/LdapAuthentication/LdapAuthentication.php';
$wgAuth = new LdapAuthenticationPlugin();
$wgLDAPDomainNames = array(
'ramkee.local',
);
$wgLDAPServerNames = array(
'ramkee.local' => 'polyproxy.ramkee.local',
);
$wgLDAPEncryptionType = array(
'ramkee.local' => 'clear',
);
$wgAuthLDAPBindDN = array( 'ramkee.local' => 'cn=admin,dc=ramkee,dc=local');
$wgAuthLDAPBindPassword = array( 'ramkee.local' => 'safesquid');
$wgLDAPPort = array(
'ramkee.local' => 389,
);
$wgLDAPSearchAttributes = array(
'ramkee.local' => 'uid'
);
$wgLDAPBaseDNs = array(
'ramkee.local' => 'dc=ramkee,dc=local',
);
$wgLDAPDebug = 3;
$wgDebugLogGroups["ldap"] = "/tmp/wikildapdebug.log" ;
se você receber algum erro, por favor me avise. Obrigado!