![mediawiki: LDAP 인증 오류](https://rvso.com/image/1419594/mediawiki%3A%20LDAP%20%EC%9D%B8%EC%A6%9D%20%EC%98%A4%EB%A5%98.png)
php5+mysql+ldap 을 사용하고 있습니다. 나는 mediawiki로 php와 mysql을 구성했습니다. 잘 작동해요. 하지만 저는 LDAP 사용자 인증 로그인과 일반 사용자 로그인을 제공하고 싶습니다.
나는 ldapauthentication 모듈을 설치했습니다 미디어 위키 LDAP인증 페이지
현재 상황은 일반적으로 내 미디어위키에서 계정을 만들 수 있지만 LDAP 사용자는 만들 수 없습니다.
여기에 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'
# )
#;
ldap에 대한 계정을 만들려고 할 때마다 데이터베이스를 업데이트할 권한이 없다고 표시됩니다.(내 데이터베이스는 mysql입니다.) 계정을 만드는 동안 다음 오류가 발생합니다.
관리자로 로그인하는 동안 수락됩니다(관리자는 LDAP에 없습니다).
내 LDAP도 작동 중이고 포트 389가 작동 중이며 ldapsearch -x도 작동 중입니다. 하지만 내가 어디에서 실수를 했는지는 알 수 없습니다. 관리자 한 명만 로그인이 가능하며, 일반 사용자도 로그인이 불가능합니다. 지난 3일 동안 고생했어요. 누구든지 나를 도와줄 수 있어요
답변1
내가 실수한 곳에서 내 자신을 찾았습니다. 여기에서 내 localsettings.php를 제공하고 있습니다. 필요한 사람이 있으면 이것을 따르십시오. 성공할 수 있습니다
성공적인 미디어위키 페이지가 생성되면 새로운 localsettings.php를 얻게 됩니다. 거기에 다음 줄을 추가하면 됩니다. 그러면 LDAP 데이터베이스에 대한 인증을 받게 됩니다.
LDAP 데이터베이스에 있는 사람들은 우리 미디어위키에 계정을 만들 필요가 없으며, 위키 계정을 만들지 않고도 직접 로그인할 수 있습니다.
ramkee.localismy 도메인 이름입니다.폴리프록시.ramkee.local내 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" ;
오류가 있으면 알려주세요. 감사해요!