summaryrefslogtreecommitdiff
path: root/lib/plugins/authldap
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/authldap')
-rw-r--r--lib/plugins/authldap/auth.php540
-rw-r--r--lib/plugins/authldap/conf/default.php20
-rw-r--r--lib/plugins/authldap/conf/metadata.php19
-rw-r--r--lib/plugins/authldap/lang/bg/settings.php19
-rw-r--r--lib/plugins/authldap/lang/cs/settings.php21
-rw-r--r--lib/plugins/authldap/lang/de-informal/settings.php28
-rw-r--r--lib/plugins/authldap/lang/de/settings.php22
-rw-r--r--lib/plugins/authldap/lang/en/settings.php23
-rw-r--r--lib/plugins/authldap/lang/eo/settings.php20
-rw-r--r--lib/plugins/authldap/lang/fi/settings.php6
-rw-r--r--lib/plugins/authldap/lang/fr/settings.php21
-rw-r--r--lib/plugins/authldap/lang/it/settings.php5
-rw-r--r--lib/plugins/authldap/lang/ja/settings.php6
-rw-r--r--lib/plugins/authldap/lang/ko/settings.php21
-rw-r--r--lib/plugins/authldap/lang/lv/settings.php6
-rw-r--r--lib/plugins/authldap/lang/nl/settings.php20
-rw-r--r--lib/plugins/authldap/lang/pt-br/settings.php26
-rw-r--r--lib/plugins/authldap/lang/ru/settings.php6
-rw-r--r--lib/plugins/authldap/lang/sv/settings.php16
-rw-r--r--lib/plugins/authldap/lang/zh-tw/settings.php21
-rw-r--r--lib/plugins/authldap/lang/zh/settings.php21
-rw-r--r--lib/plugins/authldap/plugin.info.txt7
22 files changed, 894 insertions, 0 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php
new file mode 100644
index 000000000..6a967a6d4
--- /dev/null
+++ b/lib/plugins/authldap/auth.php
@@ -0,0 +1,540 @@
+<?php
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
+
+/**
+ * LDAP authentication backend
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Chris Smith <chris@jalakaic.co.uk>
+ * @author Jan Schumann <js@schumann-it.com>
+ */
+class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
+ /* @var resource $con holds the LDAP connection*/
+ protected $con = null;
+
+ /* @var int $bound What type of connection does already exist? */
+ protected $bound = 0; // 0: anonymous, 1: user, 2: superuser
+
+ /* @var array $users User data cache */
+ protected $users = null;
+
+ /* @var array $_pattern User filter pattern */
+ protected $_pattern = null;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ parent::__construct();
+
+ // ldap extension is needed
+ if(!function_exists('ldap_connect')) {
+ $this->_debug("LDAP err: PHP LDAP extension not found.", -1, __LINE__, __FILE__);
+ $this->success = false;
+ return;
+ }
+
+ // auth_ldap currently just handles authentication, so no
+ // capabilities are set
+ }
+
+ /**
+ * Check user+password
+ *
+ * Checks if the given user exists and the given
+ * plaintext password is correct by trying to bind
+ * to the LDAP server
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $user
+ * @param string $pass
+ * @return bool
+ */
+ public function checkPass($user, $pass) {
+ // reject empty password
+ if(empty($pass)) return false;
+ if(!$this->_openLDAP()) return false;
+
+ // indirect user bind
+ if($this->getConf('binddn') && $this->getConf('bindpw')) {
+ // use superuser credentials
+ if(!@ldap_bind($this->con, $this->getConf('binddn'), $this->getConf('bindpw'))) {
+ $this->_debug('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ return false;
+ }
+ $this->bound = 2;
+ } else if($this->getConf('binddn') &&
+ $this->getConf('usertree') &&
+ $this->getConf('userfilter')
+ ) {
+ // special bind string
+ $dn = $this->_makeFilter(
+ $this->getConf('binddn'),
+ array('user'=> $user, 'server'=> $this->getConf('server'))
+ );
+
+ } else if(strpos($this->getConf('usertree'), '%{user}')) {
+ // direct user bind
+ $dn = $this->_makeFilter(
+ $this->getConf('usertree'),
+ array('user'=> $user, 'server'=> $this->getConf('server'))
+ );
+
+ } else {
+ // Anonymous bind
+ if(!@ldap_bind($this->con)) {
+ msg("LDAP: can not bind anonymously", -1);
+ $this->_debug('LDAP anonymous bind: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ return false;
+ }
+ }
+
+ // Try to bind to with the dn if we have one.
+ if(!empty($dn)) {
+ // User/Password bind
+ if(!@ldap_bind($this->con, $dn, $pass)) {
+ $this->_debug("LDAP: bind with $dn failed", -1, __LINE__, __FILE__);
+ $this->_debug('LDAP user dn bind: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ return false;
+ }
+ $this->bound = 1;
+ return true;
+ } else {
+ // See if we can find the user
+ $info = $this->getUserData($user, true);
+ if(empty($info['dn'])) {
+ return false;
+ } else {
+ $dn = $info['dn'];
+ }
+
+ // Try to bind with the dn provided
+ if(!@ldap_bind($this->con, $dn, $pass)) {
+ $this->_debug("LDAP: bind with $dn failed", -1, __LINE__, __FILE__);
+ $this->_debug('LDAP user bind: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ return false;
+ }
+ $this->bound = 1;
+ return true;
+ }
+ }
+
+ /**
+ * Return user info
+ *
+ * Returns info about the given user needs to contain
+ * at least these fields:
+ *
+ * name string full name of the user
+ * mail string email addres of the user
+ * grps array list of groups the user is in
+ *
+ * This LDAP specific function returns the following
+ * addional fields:
+ *
+ * dn string distinguished name (DN)
+ * uid string Posix User ID
+ * inbind bool for internal use - avoid loop in binding
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Trouble
+ * @author Dan Allen <dan.j.allen@gmail.com>
+ * @author <evaldas.auryla@pheur.org>
+ * @author Stephane Chazelas <stephane.chazelas@emerson.com>
+ *
+ * @param string $user
+ * @param bool $inbind authldap specific, true if in bind phase
+ * @return array containing user data or false
+ */
+ public function getUserData($user, $inbind = false) {
+ global $conf;
+ if(!$this->_openLDAP()) return false;
+
+ // force superuser bind if wanted and not bound as superuser yet
+ if($this->getConf('binddn') && $this->getConf('bindpw') && $this->bound < 2) {
+ // use superuser credentials
+ if(!@ldap_bind($this->con, $this->getConf('binddn'), $this->getConf('bindpw'))) {
+ $this->_debug('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ return false;
+ }
+ $this->bound = 2;
+ } elseif($this->bound == 0 && !$inbind) {
+ // in some cases getUserData is called outside the authentication workflow
+ // eg. for sending email notification on subscribed pages. This data might not
+ // be accessible anonymously, so we try to rebind the current user here
+ list($loginuser, $loginsticky, $loginpass) = auth_getCookie();
+ if($loginuser && $loginpass) {
+ $loginpass = PMA_blowfish_decrypt($loginpass, auth_cookiesalt(!$loginsticky));
+ $this->checkPass($loginuser, $loginpass);
+ }
+ }
+
+ $info['user'] = $user;
+ $info['server'] = $this->getConf('server');
+
+ //get info for given user
+ $base = $this->_makeFilter($this->getConf('usertree'), $info);
+ if($this->getConf('userfilter')) {
+ $filter = $this->_makeFilter($this->getConf('userfilter'), $info);
+ } else {
+ $filter = "(ObjectClass=*)";
+ }
+
+ $sr = $this->_ldapsearch($this->con, $base, $filter, $this->getConf('userscope'));
+ $result = @ldap_get_entries($this->con, $sr);
+ $this->_debug('LDAP user search: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ $this->_debug('LDAP search at: '.htmlspecialchars($base.' '.$filter), 0, __LINE__, __FILE__);
+
+ // Don't accept more or less than one response
+ if(!is_array($result) || $result['count'] != 1) {
+ return false; //user not found
+ }
+
+ $user_result = $result[0];
+ ldap_free_result($sr);
+
+ // general user info
+ $info['dn'] = $user_result['dn'];
+ $info['gid'] = $user_result['gidnumber'][0];
+ $info['mail'] = $user_result['mail'][0];
+ $info['name'] = $user_result['cn'][0];
+ $info['grps'] = array();
+
+ // overwrite if other attribs are specified.
+ if(is_array($this->getConf('mapping'))) {
+ foreach($this->getConf('mapping') as $localkey => $key) {
+ if(is_array($key)) {
+ // use regexp to clean up user_result
+ list($key, $regexp) = each($key);
+ if($user_result[$key]) foreach($user_result[$key] as $grp) {
+ if(preg_match($regexp, $grp, $match)) {
+ if($localkey == 'grps') {
+ $info[$localkey][] = $match[1];
+ } else {
+ $info[$localkey] = $match[1];
+ }
+ }
+ }
+ } else {
+ $info[$localkey] = $user_result[$key][0];
+ }
+ }
+ }
+ $user_result = array_merge($info, $user_result);
+
+ //get groups for given user if grouptree is given
+ if($this->getConf('grouptree') || $this->getConf('groupfilter')) {
+ $base = $this->_makeFilter($this->getConf('grouptree'), $user_result);
+ $filter = $this->_makeFilter($this->getConf('groupfilter'), $user_result);
+ $sr = $this->_ldapsearch($this->con, $base, $filter, $this->getConf('groupscope'), array($this->getConf('groupkey')));
+ $this->_debug('LDAP group search: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ $this->_debug('LDAP search at: '.htmlspecialchars($base.' '.$filter), 0, __LINE__, __FILE__);
+
+ if(!$sr) {
+ msg("LDAP: Reading group memberships failed", -1);
+ return false;
+ }
+ $result = ldap_get_entries($this->con, $sr);
+ ldap_free_result($sr);
+
+ if(is_array($result)) foreach($result as $grp) {
+ if(!empty($grp[$this->getConf('groupkey')][0])) {
+ $this->_debug('LDAP usergroup: '.htmlspecialchars($grp[$this->getConf('groupkey')][0]), 0, __LINE__, __FILE__);
+ $info['grps'][] = $grp[$this->getConf('groupkey')][0];
+ }
+ }
+ }
+
+ // always add the default group to the list of groups
+ if(!$info['grps'] or !in_array($conf['defaultgroup'], $info['grps'])) {
+ $info['grps'][] = $conf['defaultgroup'];
+ }
+ return $info;
+ }
+
+ /**
+ * Most values in LDAP are case-insensitive
+ *
+ * @return bool
+ */
+ public function isCaseSensitive() {
+ return false;
+ }
+
+ /**
+ * Bulk retrieval of user data
+ *
+ * @author Dominik Eckelmann <dokuwiki@cosmocode.de>
+ * @param int $start index of first user to be returned
+ * @param int $limit max number of users to be returned
+ * @param array $filter array of field/pattern pairs, null for no filter
+ * @return array of userinfo (refer getUserData for internal userinfo details)
+ */
+ function retrieveUsers($start = 0, $limit = -1, $filter = array()) {
+ if(!$this->_openLDAP()) return false;
+
+ if(is_null($this->users)) {
+ // Perform the search and grab all their details
+ if($this->getConf('userfilter')) {
+ $all_filter = str_replace('%{user}', '*', $this->getConf('userfilter'));
+ } else {
+ $all_filter = "(ObjectClass=*)";
+ }
+ $sr = ldap_search($this->con, $this->getConf('usertree'), $all_filter);
+ $entries = ldap_get_entries($this->con, $sr);
+ $users_array = array();
+ for($i = 0; $i < $entries["count"]; $i++) {
+ array_push($users_array, $entries[$i]["uid"][0]);
+ }
+ asort($users_array);
+ $result = $users_array;
+ if(!$result) return array();
+ $this->users = array_fill_keys($result, false);
+ }
+ $i = 0;
+ $count = 0;
+ $this->_constructPattern($filter);
+ $result = array();
+
+ foreach($this->users as $user => &$info) {
+ if($i++ < $start) {
+ continue;
+ }
+ if($info === false) {
+ $info = $this->getUserData($user);
+ }
+ if($this->_filter($user, $info)) {
+ $result[$user] = $info;
+ if(($limit >= 0) && (++$count >= $limit)) break;
+ }
+ }
+ return $result;
+ }
+
+ /**
+ * Make LDAP filter strings.
+ *
+ * Used by auth_getUserData to make the filter
+ * strings for grouptree and groupfilter
+ *
+ * @author Troels Liebe Bentsen <tlb@rapanden.dk>
+ * @param string $filter ldap search filter with placeholders
+ * @param array $placeholders placeholders to fill in
+ * @return string
+ */
+ protected function _makeFilter($filter, $placeholders) {
+ preg_match_all("/%{([^}]+)/", $filter, $matches, PREG_PATTERN_ORDER);
+ //replace each match
+ foreach($matches[1] as $match) {
+ //take first element if array
+ if(is_array($placeholders[$match])) {
+ $value = $placeholders[$match][0];
+ } else {
+ $value = $placeholders[$match];
+ }
+ $value = $this->_filterEscape($value);
+ $filter = str_replace('%{'.$match.'}', $value, $filter);
+ }
+ return $filter;
+ }
+
+ /**
+ * return true if $user + $info match $filter criteria, false otherwise
+ *
+ * @author Chris Smith <chris@jalakai.co.uk>
+ *
+ * @param string $user the user's login name
+ * @param array $info the user's userinfo array
+ * @return bool
+ */
+ protected function _filter($user, $info) {
+ foreach($this->_pattern as $item => $pattern) {
+ if($item == 'user') {
+ if(!preg_match($pattern, $user)) return false;
+ } else if($item == 'grps') {
+ if(!count(preg_grep($pattern, $info['grps']))) return false;
+ } else {
+ if(!preg_match($pattern, $info[$item])) return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Set the filter pattern
+ *
+ * @author Chris Smith <chris@jalakai.co.uk>
+ *
+ * @param $filter
+ * @return void
+ */
+ protected function _constructPattern($filter) {
+ $this->_pattern = array();
+ foreach($filter as $item => $pattern) {
+ $this->_pattern[$item] = '/'.str_replace('/', '\/', $pattern).'/i'; // allow regex characters
+ }
+ }
+
+ /**
+ * Escape a string to be used in a LDAP filter
+ *
+ * Ported from Perl's Net::LDAP::Util escape_filter_value
+ *
+ * @author Andreas Gohr
+ * @param string $string
+ * @return string
+ */
+ protected function _filterEscape($string) {
+ return preg_replace(
+ '/([\x00-\x1F\*\(\)\\\\])/e',
+ '"\\\\\".join("",unpack("H2","$1"))',
+ $string
+ );
+ }
+
+ /**
+ * Opens a connection to the configured LDAP server and sets the wanted
+ * option on the connection
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+ protected function _openLDAP() {
+ if($this->con) return true; // connection already established
+
+ $this->bound = 0;
+
+ $port = $this->getConf('port');
+ $bound = false;
+ $servers = explode(',', $this->getConf('server'));
+ foreach($servers as $server) {
+ $server = trim($server);
+ $this->con = @ldap_connect($server, $port);
+ if(!$this->con) {
+ continue;
+ }
+
+ /*
+ * When OpenLDAP 2.x.x is used, ldap_connect() will always return a resource as it does
+ * not actually connect but just initializes the connecting parameters. The actual
+ * connect happens with the next calls to ldap_* funcs, usually with ldap_bind().
+ *
+ * So we should try to bind to server in order to check its availability.
+ */
+
+ //set protocol version and dependend options
+ if($this->getConf('version')) {
+ if(!@ldap_set_option(
+ $this->con, LDAP_OPT_PROTOCOL_VERSION,
+ $this->getConf('version')
+ )
+ ) {
+ msg('Setting LDAP Protocol version '.$this->getConf('version').' failed', -1);
+ $this->_debug('LDAP version set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ } else {
+ //use TLS (needs version 3)
+ if($this->getConf('starttls')) {
+ if(!@ldap_start_tls($this->con)) {
+ msg('Starting TLS failed', -1);
+ $this->_debug('LDAP TLS set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ }
+ }
+ // needs version 3
+ if($this->getConf('referrals')) {
+ if(!@ldap_set_option(
+ $this->con, LDAP_OPT_REFERRALS,
+ $this->getConf('referrals')
+ )
+ ) {
+ msg('Setting LDAP referrals to off failed', -1);
+ $this->_debug('LDAP referal set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ }
+ }
+ }
+ }
+
+ //set deref mode
+ if($this->getConf('deref')) {
+ if(!@ldap_set_option($this->con, LDAP_OPT_DEREF, $this->getConf('deref'))) {
+ msg('Setting LDAP Deref mode '.$this->getConf('deref').' failed', -1);
+ $this->_debug('LDAP deref set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ }
+ }
+ /* As of PHP 5.3.0 we can set timeout to speedup skipping of invalid servers */
+ if(defined('LDAP_OPT_NETWORK_TIMEOUT')) {
+ ldap_set_option($this->con, LDAP_OPT_NETWORK_TIMEOUT, 1);
+ }
+
+ if($this->getConf('binddn') && $this->getConf('bindpw')) {
+ $bound = @ldap_bind($this->con, $this->getConf('binddn'), $this->getConf('bindpw'));
+ $this->bound = 2;
+ } else {
+ $bound = @ldap_bind($this->con);
+ }
+ if($bound) {
+ break;
+ }
+ }
+
+ if(!$bound) {
+ msg("LDAP: couldn't connect to LDAP server", -1);
+ return false;
+ }
+
+ $this->cando['getUsers'] = true;
+ return true;
+ }
+
+ /**
+ * Wraps around ldap_search, ldap_list or ldap_read depending on $scope
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @param resource $link_identifier
+ * @param string $base_dn
+ * @param string $filter
+ * @param string $scope can be 'base', 'one' or 'sub'
+ * @param null $attributes
+ * @param int $attrsonly
+ * @param int $sizelimit
+ * @param int $timelimit
+ * @param int $deref
+ * @return resource
+ */
+ protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null,
+ $attrsonly = 0, $sizelimit = 0) {
+ if(is_null($attributes)) $attributes = array();
+
+ if($scope == 'base') {
+ return @ldap_read(
+ $link_identifier, $base_dn, $filter, $attributes,
+ $attrsonly, $sizelimit
+ );
+ } elseif($scope == 'one') {
+ return @ldap_list(
+ $link_identifier, $base_dn, $filter, $attributes,
+ $attrsonly, $sizelimit
+ );
+ } else {
+ return @ldap_search(
+ $link_identifier, $base_dn, $filter, $attributes,
+ $attrsonly, $sizelimit
+ );
+ }
+ }
+
+ /**
+ * Wrapper around msg() but outputs only when debug is enabled
+ *
+ * @param string $message
+ * @param int $err
+ * @param int $line
+ * @param string $file
+ * @return void
+ */
+ protected function _debug($message, $err, $line, $file) {
+ if(!$this->getConf('debug')) return;
+ msg($message, $err, $line, $file);
+ }
+
+}
diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php
new file mode 100644
index 000000000..2c295eeeb
--- /dev/null
+++ b/lib/plugins/authldap/conf/default.php
@@ -0,0 +1,20 @@
+<?php
+
+$conf['server'] = '';
+$conf['port'] = 389;
+$conf['usertree'] = '';
+$conf['grouptree'] = '';
+$conf['userfilter'] = '';
+$conf['groupfilter'] = '';
+$conf['version'] = 2;
+$conf['starttls'] = 0;
+$conf['referrals'] = 0;
+$conf['deref'] = 0;
+$conf['binddn'] = '';
+$conf['bindpw'] = '';
+//$conf['mapping']['name'] unsupported in config manager
+//$conf['mapping']['grps'] unsupported in config manager
+$conf['userscope'] = 'sub';
+$conf['groupscope'] = 'sub';
+$conf['groupkey'] = 'cn';
+$conf['debug'] = 0; \ No newline at end of file
diff --git a/lib/plugins/authldap/conf/metadata.php b/lib/plugins/authldap/conf/metadata.php
new file mode 100644
index 000000000..a3256628c
--- /dev/null
+++ b/lib/plugins/authldap/conf/metadata.php
@@ -0,0 +1,19 @@
+<?php
+$meta['server'] = array('string');
+$meta['port'] = array('numeric');
+$meta['usertree'] = array('string');
+$meta['grouptree'] = array('string');
+$meta['userfilter'] = array('string');
+$meta['groupfilter'] = array('string');
+$meta['version'] = array('numeric');
+$meta['starttls'] = array('onoff');
+$meta['referrals'] = array('onoff');
+$meta['deref'] = array('multichoice','_choices' => array(0,1,2,3));
+$meta['binddn'] = array('string');
+$meta['bindpw'] = array('password');
+//$meta['mapping']['name'] unsupported in config manager
+//$meta['mapping']['grps'] unsupported in config manager
+$meta['userscope'] = array('multichoice','_choices' => array('sub','one','base'));
+$meta['groupscope'] = array('multichoice','_choices' => array('sub','one','base'));
+$meta['groupkey'] = array('string');
+$meta['debug'] = array('onoff'); \ No newline at end of file
diff --git a/lib/plugins/authldap/lang/bg/settings.php b/lib/plugins/authldap/lang/bg/settings.php
new file mode 100644
index 000000000..644672ca7
--- /dev/null
+++ b/lib/plugins/authldap/lang/bg/settings.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Bulgarian language file
+ *
+ * @author Kiril <neohidra@gmail.com>
+ */
+$lang['server'] = 'Вашият LDAP сървър. Име на хоста (<code>localhost</code>) или целият URL адрес (<code>ldap://сървър.tld:389</code>)';
+$lang['port'] = 'Порт на LDAP сървъра, ако не сте въвели целия URL адрес по-горе';
+$lang['usertree'] = 'Къде да се търси за потребителски акаунти. Например <code>ou=People, dc=server, dc=tld</code>';
+$lang['grouptree'] = 'Къде да се търси за потребителски групи. Например <code>ou=Group, dc=server, dc=tld</code>';
+$lang['userfilter'] = 'LDAP филтър за търсене на потребителски акаунти. Например <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'LDAP филтър за търсене на потребителски групи. Например <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = 'Коя версия на протокола да се ползва? Вероятно ще се наложи да зададете <code>3</code>';
+$lang['starttls'] = 'Ползване на TLS свързаност?';
+$lang['referrals'] = 'Да бъдат ли следвани препратките (препращанията)?';
+$lang['bindpw'] = 'Парола за горния потребител';
+$lang['userscope'] = 'Ограничаване на обхвата за търсене на потребители';
+$lang['groupscope'] = 'Ограничаване на обхвата за търсене на потребителски групи';
+$lang['debug'] = 'Показване на допълнителна debug информация при грешка'; \ No newline at end of file
diff --git a/lib/plugins/authldap/lang/cs/settings.php b/lib/plugins/authldap/lang/cs/settings.php
new file mode 100644
index 000000000..783d2a3ae
--- /dev/null
+++ b/lib/plugins/authldap/lang/cs/settings.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Czech language file
+ *
+ * @author mkucera66@seznam.cz
+ */
+$lang['server'] = 'Váš server LDAP. Buď jméno hosta (<code>localhost</code>) nebo plně kvalifikovaný popis URL (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'Port serveru LDAP. Pokud není, bude využito URL výše';
+$lang['usertree'] = 'Kde najít uživatelské účty, tj. <code>ou=Lide, dc=server, dc=tld</code>';
+$lang['grouptree'] = 'Kde najít uživatelské skupiny, tj. <code>ou=Skupina, dc=server, dc=tld</code>';
+$lang['userfilter'] = 'Filter LDAPu pro vyhledávání uživatelských účtů, tj. <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'Filter LDAPu pro vyhledávání uživatelských skupin, tj. <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['version'] = 'Verze použitého protokolu. Můžete potřebovat jej nastavit na <code>3</code>';
+$lang['starttls'] = 'Využít spojení TLS?';
+$lang['referrals'] = 'Přeposílat odkazy?';
+$lang['binddn'] = 'Doménový název DN volitelně připojeného uživatele, pokus anonymní připojení není vyhovující, tj. <code>cn=admin, dc=muj, dc=domov</code>';
+$lang['bindpw'] = 'Heslo uživatele výše';
+$lang['userscope'] = 'Omezení rozsahu vyhledávání uživatele';
+$lang['groupscope'] = 'Omezení rozsahu vyhledávání skupiny';
+$lang['groupkey'] = 'Atribut šlenství uživatele ve skupinách (namísto standardních AD skupin), tj. skupina z oddělení nebo telefonní číslo';
+$lang['debug'] = 'Zobrazit dodatečné debugovací informace';
diff --git a/lib/plugins/authldap/lang/de-informal/settings.php b/lib/plugins/authldap/lang/de-informal/settings.php
new file mode 100644
index 000000000..15e4d8129
--- /dev/null
+++ b/lib/plugins/authldap/lang/de-informal/settings.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * German informal language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Matthias Schulte <dokuwiki@lupo49.de>
+ * @author Volker Bödker <volker@boedker.de>
+ */
+$lang['server'] = 'Adresse zum LDAP-Server. Entweder als Hostname (<code>localhost</code>) oder als FQDN (<code>ldap://server.tld:389</code>).';
+$lang['port'] = 'Port des LDAP-Servers, falls kein Port angegeben wurde.';
+$lang['usertree'] = 'Zweig, in dem die die Benutzeraccounts gespeichert sind. Zum Beispiel: <code>ou=People, dc=server, dc=tld</code>.';
+$lang['grouptree'] = 'Zweig, in dem die Benutzergruppen gespeichert sind. Zum Beispiel: <code>ou=Group, dc=server, dc=tld</code>.';
+$lang['userfilter'] = 'LDAP-Filter, um die Benutzeraccounts zu suchen. Zum Beispiel: <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>.';
+$lang['groupfilter'] = 'LDAP-Filter, um die Benutzergruppen zu suchen. Zum Beispiel: <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>.';
+$lang['version'] = 'Zu verwendende Protokollversion von LDAP.';
+$lang['starttls'] = 'Verbindung über TLS aufbauen?';
+$lang['referrals'] = 'Weiterverfolgen von LDAP-Referrals (Verweise)?';
+$lang['deref'] = 'Wie sollen Aliasse derefernziert werden?';
+$lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonyme Zugriff nicht ausreichend ist. Zum Beispiel: <code>cn=admin, dc=my, dc=home</code>.';
+$lang['bindpw'] = 'Passwort des angegebenen Benutzers.';
+$lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.';
+$lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.';
+$lang['groupkey'] = 'Gruppieren der Benutzeraccounts anhand eines beliebigen Benutzerattributes z. B. Telefonnummer oder Abteilung, anstelle der Standard-Gruppen).';
+$lang['debug'] = 'Debug-Informationen beim Auftreten von Fehlern anzeigen?';
+$lang['deref_o_0'] = 'LDAP_DEREF_NIEMALS';
+$lang['deref_o_1'] = 'LDAP_DEREF_SUCHEN';
+$lang['deref_o_2'] = 'LDAP_DEREF_FINDEN';
+$lang['deref_o_3'] = 'LDAP_DEREF_IMMER';
diff --git a/lib/plugins/authldap/lang/de/settings.php b/lib/plugins/authldap/lang/de/settings.php
new file mode 100644
index 000000000..b237201d8
--- /dev/null
+++ b/lib/plugins/authldap/lang/de/settings.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * German language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Matthias Schulte <dokuwiki@lupo49.de>
+ */
+$lang['server'] = 'Adresse zum LDAP-Server. Entweder als Hostname (<code>localhost</code>) oder als FQDN (<code>ldap://server.tld:389</code>).';
+$lang['port'] = 'Port des LDAP-Servers, falls kein Port angegeben wurde.';
+$lang['usertree'] = 'Zweig, in dem die die Benutzeraccounts gespeichert sind. Zum Beispiel: <code>ou=People, dc=server, dc=tld</code>.';
+$lang['grouptree'] = 'Zweig, in dem die Benutzergruppen gespeichert sind. Zum Beispiel: <code>ou=Group, dc=server, dc=tld</code>.';
+$lang['userfilter'] = 'LDAP-Filter, um die Benutzeraccounts zu suchen. Zum Beispiel: <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>.';
+$lang['groupfilter'] = 'LDAP-Filter, um die Benutzergruppen zu suchen. Zum Beispiel: <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>.';
+$lang['version'] = 'Zu verwendende Protokollversion von LDAP.';
+$lang['starttls'] = 'Verbindung über TLS aufbauen?';
+$lang['referrals'] = 'Weiterverfolgen von LDAP-Referrals (Verweise)?';
+$lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonyme Zugriff nicht ausreichend ist. Zum Beispiel: <code>cn=admin, dc=my, dc=home</code>.';
+$lang['bindpw'] = 'Passwort des angegebenen Benutzers.';
+$lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.';
+$lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.';
+$lang['groupkey'] = 'Gruppieren der Benutzeraccounts anhand eines beliebigen Benutzerattributes z. B. Telefonnummer oder Abteilung, anstelle der Standard-Gruppen).';
+$lang['debug'] = 'Debug-Informationen beim Auftreten von Fehlern anzeigen?';
diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php
new file mode 100644
index 000000000..e3f385f99
--- /dev/null
+++ b/lib/plugins/authldap/lang/en/settings.php
@@ -0,0 +1,23 @@
+<?php
+$lang['server'] = 'Your LDAP server. Either hostname (<code>localhost</code>) or full qualified URL (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'LDAP server port if no full URL was given above';
+$lang['usertree'] = 'Where to find the user accounts. Eg. <code>ou=People, dc=server, dc=tld</code>';
+$lang['grouptree'] = 'Where to find the user groups. Eg. <code>ou=Group, dc=server, dc=tld</code>';
+$lang['userfilter'] = 'LDAP filter to search for user accounts. Eg. <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'LDAP filter to search for groups. Eg. <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = 'The protocol version to use. You may need to set this to <code>3</code>';
+$lang['starttls'] = 'Use TLS connections?';
+$lang['referrals'] = 'Shall referrals be followed?';
+$lang['deref'] = 'How to dereference aliases?';
+$lang['binddn'] = 'DN of an optional bind user if anonymous bind is not sufficient. Eg. <code>cn=admin, dc=my, dc=home</code>';
+$lang['bindpw'] = 'Password of above user';
+$lang['userscope'] = 'Limit search scope for user search';
+$lang['groupscope'] = 'Limit search scope for group search';
+$lang['groupkey'] = 'Group membership from any user attribute (instead of standard AD groups) e.g. group from department or telephone number';
+$lang['debug'] = 'Display additional debug information on errors';
+
+
+$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
+$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
+$lang['deref_o_2'] = 'LDAP_DEREF_FINDING';
+$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; \ No newline at end of file
diff --git a/lib/plugins/authldap/lang/eo/settings.php b/lib/plugins/authldap/lang/eo/settings.php
new file mode 100644
index 000000000..2863a1125
--- /dev/null
+++ b/lib/plugins/authldap/lang/eo/settings.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Esperanto language file
+ *
+ */
+$lang['server'] = 'Via LDAP-servilo. Aŭ servila nomo (<code>localhost</code>) aŭ plene detala URL (<code>ldap://servilo.lando:389</code>)';
+$lang['port'] = 'LDAP-servila pordego, se vi supre ne indikis la plenan URL';
+$lang['usertree'] = 'Kie trovi uzantajn kontojn, ekz. <code>ou=Personoj, dc=servilo, dc=lando</code>';
+$lang['grouptree'] = 'Kie trovi uzantogrupojn, ekz. <code>ou=Grupo, dc=servilo, dc=lando</code>';
+$lang['userfilter'] = 'LDAP-filtrilo por serĉi uzantokontojn, ekz. <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'LDAP-filtrilo por serĉi grupojn, ekz. <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = 'La uzenda protokolversio. Eble necesas indiki <code>3</code>';
+$lang['starttls'] = 'Ĉu uzi TLS-konektojn?';
+$lang['referrals'] = 'Ĉu sekvi referencojn?';
+$lang['binddn'] = 'DN de opcie bindita uzanto, se anonima bindado ne sufiĉas, ekz. <code>cn=admin, dc=mia, dc=hejmo</code>';
+$lang['bindpw'] = 'Pasvorto de tiu uzanto';
+$lang['userscope'] = 'Limigi serĉospacon de uzantaj serĉoj';
+$lang['groupscope'] = 'Limigi serĉospacon por grupaj serĉoj';
+$lang['groupkey'] = 'Grupa membreco de iu uzanta atributo (anstataŭ standardaj AD-grupoj), ekz. grupo de departemento aŭ telefonnumero';
+$lang['debug'] = 'Ĉu montri aldonajn erarinformojn?';
diff --git a/lib/plugins/authldap/lang/fi/settings.php b/lib/plugins/authldap/lang/fi/settings.php
new file mode 100644
index 000000000..d3aa13e07
--- /dev/null
+++ b/lib/plugins/authldap/lang/fi/settings.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * Finnish language file
+ *
+ * @author Otto Vainio <otto@valjakko.net>
+ */
diff --git a/lib/plugins/authldap/lang/fr/settings.php b/lib/plugins/authldap/lang/fr/settings.php
new file mode 100644
index 000000000..3df09eb7c
--- /dev/null
+++ b/lib/plugins/authldap/lang/fr/settings.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * French language file
+ *
+ * @author Bruno Veilleux <bruno.vey@gmail.com>
+ */
+$lang['server'] = 'Votre serveur LDAP. Soit le nom d\'hôte (<code>localhost</code>) ou l\'URL complète (<code>ldap://serveur.dom:389</code>)';
+$lang['port'] = 'Port du serveur LDAP si l\'URL complète n\'a pas été indiquée ci-dessus';
+$lang['usertree'] = 'Où trouver les comptes utilisateur. Ex.: <code>ou=Utilisateurs, dc=serveur, dc=dom</code>';
+$lang['grouptree'] = 'Où trouver les groupes d\'utilisateurs. Ex.: <code>ou=Groupes, dc=serveur, dc=dom</code>';
+$lang['userfilter'] = 'Filtre LDAP pour rechercher les comptes utilisateur. Ex.: <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'Filtre LDAP pour rechercher les groupes. Ex.: <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = 'La version de protocole à utiliser. Il se peut que vous deviez utiliser <code>3</code>';
+$lang['starttls'] = 'Utiliser les connexions TLS?';
+$lang['referrals'] = 'Suivre les références?';
+$lang['binddn'] = 'Nom de domaine d\'un utilisateur de connexion facultatif si une connexion anonyme n\'est pas suffisante. Ex. : <code>cn=admin, dc=mon, dc=accueil</code>';
+$lang['bindpw'] = 'Mot de passe de l\'utilisateur ci-dessus.';
+$lang['userscope'] = 'Limiter la portée de recherche d\'utilisateurs';
+$lang['groupscope'] = 'Limiter la portée de recherche de groupes';
+$lang['groupkey'] = 'Affiliation aux groupes à partir de n\'importe quel attribut utilisateur (au lieu des groupes AD standards), p. ex. groupes par département ou numéro de téléphone';
+$lang['debug'] = 'Afficher des informations de bégogage supplémentaires pour les erreurs';
diff --git a/lib/plugins/authldap/lang/it/settings.php b/lib/plugins/authldap/lang/it/settings.php
new file mode 100644
index 000000000..10ae72f87
--- /dev/null
+++ b/lib/plugins/authldap/lang/it/settings.php
@@ -0,0 +1,5 @@
+<?php
+/**
+ * Italian language file
+ *
+ */
diff --git a/lib/plugins/authldap/lang/ja/settings.php b/lib/plugins/authldap/lang/ja/settings.php
new file mode 100644
index 000000000..fdc6fc434
--- /dev/null
+++ b/lib/plugins/authldap/lang/ja/settings.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * Japanese language file
+ *
+ * @author Satoshi Sahara <sahara.satoshi@gmail.com>
+ */
diff --git a/lib/plugins/authldap/lang/ko/settings.php b/lib/plugins/authldap/lang/ko/settings.php
new file mode 100644
index 000000000..7f7efe8d0
--- /dev/null
+++ b/lib/plugins/authldap/lang/ko/settings.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Korean language file
+ *
+ * @author Myeongjin <aranet100@gmail.com>
+ */
+$lang['server'] = 'LDAP 서버. 호스트 이름(<code>localhost</code>)이나 전체 자격 URL(<code>ldap://server.tld:389</code>) 중 하나';
+$lang['port'] = '위에 주어진 전체 URL이 없을 때의 LDAP 서버 포트';
+$lang['usertree'] = '사용자 계정을 찾을 장소. 예를 들어 <code>ou=People, dc=server, dc=tld</code>';
+$lang['grouptree'] = '사용자 그룹을 찾을 장소. 예를 들어 <code>ou=Group, dc=server, dc=tld</code>';
+$lang['userfilter'] = '사용자 계정을 찾을 LDAP 필터. 예를 들어 <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = '그룹을 찾을 LDAP 필터. 예를 들어 <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = '사용할 프로토콜 버전. <code>3</code>으로 설정해야 할 수도 있습니다';
+$lang['starttls'] = 'TLS 연결을 사용하겠습니까?';
+$lang['referrals'] = '참고(referrals)를 허용하겠습니까? ';
+$lang['binddn'] = '익명 바인드가 충분하지 않으면 선택적인 바인드 사용자의 DN. 예를 들어 <code>cn=admin, dc=my, dc=home</code>';
+$lang['bindpw'] = '위 사용자의 비밀번호';
+$lang['userscope'] = '사용자 찾기에 대한 찾기 범위 제한';
+$lang['groupscope'] = '그룹 찾기에 대한 찾기 범위 제한';
+$lang['groupkey'] = '(표준 AD 그룹 대신) 사용자 속성에서 그룹 구성원. 예를 들어 부서나 전화에서 그룹';
+$lang['debug'] = '오류에 대한 추가적인 디버그 정보를 보이기';
diff --git a/lib/plugins/authldap/lang/lv/settings.php b/lib/plugins/authldap/lang/lv/settings.php
new file mode 100644
index 000000000..ced5dabf8
--- /dev/null
+++ b/lib/plugins/authldap/lang/lv/settings.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * Latvian, Lettish language file
+ *
+ * @author Aivars Miška <allefm@gmail.com>
+ */
diff --git a/lib/plugins/authldap/lang/nl/settings.php b/lib/plugins/authldap/lang/nl/settings.php
new file mode 100644
index 000000000..274c3b7fc
--- /dev/null
+++ b/lib/plugins/authldap/lang/nl/settings.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Dutch language file
+ *
+ */
+$lang['server'] = 'Je LDAP server. Ofwel servernaam (<code>localhost</code>) of volledige URL (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'LDAP server poort als hiervoor geen volledige URL is opgegeven';
+$lang['usertree'] = 'Locatie van de gebruikersaccounts. Bijv. <code>ou=Personen,dc=server,dc=tld</code>';
+$lang['grouptree'] = 'Locatie van de gebruikersgroepen. Bijv. <code>ou=Group,dc=server,dc=tld</code>';
+$lang['userfilter'] = 'LDAP gebruikersfilter. Bijv. <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'LDAP groepsfilter. Bijv. <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = 'Te gebruiken protocolversie. Je zou het moeten kunnen instellen op <code>3</code>';
+$lang['starttls'] = 'Gebruiken TLS verbindingen';
+$lang['referrals'] = 'Moeten verwijzingen worden gevolg';
+$lang['binddn'] = 'DN van een optionele bind gebruiker als anonieme bind niet genoeg is. Bijv. <code>cn=beheer, dc=mijn, dc=thuis</code>';
+$lang['bindpw'] = 'Wachtwoord van bovenstaande gebruiker';
+$lang['userscope'] = 'Beperken scope van zoekfuncties voor gebruikers';
+$lang['groupscope'] = 'Beperken scope van zoekfuncties voor groepen';
+$lang['groupkey'] = 'Groepslidmaatschap van enig gebruikersattribuut (in plaats van standaard AD groepen), bijv. groep van afdeling of telefoonnummer';
+$lang['debug'] = 'Tonen van aanvullende debuginformatie bij fouten';
diff --git a/lib/plugins/authldap/lang/pt-br/settings.php b/lib/plugins/authldap/lang/pt-br/settings.php
new file mode 100644
index 000000000..70b68b289
--- /dev/null
+++ b/lib/plugins/authldap/lang/pt-br/settings.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Brazilian Portuguese language file
+ *
+ * @author Victor Westmann <victor.westmann@gmail.com>
+ */
+$lang['server'] = 'Seu servidor LDAP. Ou hostname (<code>localhost</code>) ou uma URL completa (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'Porta LDAP do servidor se nenhuma URL completa tiver sido fornecida acima';
+$lang['usertree'] = 'Onde encontrar as contas de usuários. Eg. <code>ou=Pessoas, dc=servidor, dc=tld</code>';
+$lang['grouptree'] = 'Onde encontrar os grupos de usuários. Eg. <code>ou=Pessoas, dc=servidor, dc=tld</code>';
+$lang['userfilter'] = 'Filtro do LDAP para procurar por contas de usuários. Eg. <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'Filtro do LDAP 0ara procurar por grupos. Eg. <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = 'A versão do protocolo para usar. Você talvez deva definir isto para <code>3</code>';
+$lang['starttls'] = 'Usar conexões TLS?';
+$lang['referrals'] = 'Permitir referências serem seguidas?';
+$lang['deref'] = 'Como respeitar aliases ?';
+$lang['binddn'] = 'DN de um vínculo opcional de usuário se vínculo anônimo não for suficiente. Eg. <code>cn=admin, dc=my, dc=home</code>';
+$lang['bindpw'] = 'Senha do usuário acima';
+$lang['userscope'] = 'Limitar escopo da busca para busca de usuário';
+$lang['groupscope'] = 'Limitar escopo da busca para busca de grupo';
+$lang['groupkey'] = 'Membro de grupo vem de qualquer atributo do usuário (ao invés de grupos padrões AD) e.g. departamento de grupo ou número de telefone';
+$lang['debug'] = 'Mostrar informações adicionais de depuração em erros';
+$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
+$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
+$lang['deref_o_2'] = 'LDAP_DEREF_FINDING';
+$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS';
diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php
new file mode 100644
index 000000000..4c394080e
--- /dev/null
+++ b/lib/plugins/authldap/lang/ru/settings.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * Russian language file
+ *
+ * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua)
+ */
diff --git a/lib/plugins/authldap/lang/sv/settings.php b/lib/plugins/authldap/lang/sv/settings.php
new file mode 100644
index 000000000..0fdcad147
--- /dev/null
+++ b/lib/plugins/authldap/lang/sv/settings.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Swedish language file
+ *
+ * @author Smorkster Andersson smorkster@gmail.com
+ */
+$lang['server'] = 'Din LDAO server. Antingen värdnamn (<code>localhost</code>) eller giltig full URL (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'LDAP server port, om det inte angavs full URL ovan';
+$lang['usertree'] = 'Specificera var användarkonton finns. T.ex. <code>ou=Användare, dc=server, dc=tld</code>';
+$lang['grouptree'] = 'Specificera var grupper finns. T.ex. <code>ou=Grupp, dc=server, dc=tld</code>';
+$lang['userfilter'] = 'LDAP filter för att söka efter användarkonton. T.ex. <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'LDAP filter för att söka efter grupper. T.ex. <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = 'Version av protokoll att använda. Du kan behöva sätta detta till <code>3</code>';
+$lang['bindpw'] = 'Lösenord för användare ovan';
+$lang['groupkey'] = 'Gruppmedlemskap från något användarattribut (istället för standard AD grupp) t.ex. grupp från avdelning eller telefonnummer';
+$lang['debug'] = 'Visa ytterligare felsökningsinformation vid fel';
diff --git a/lib/plugins/authldap/lang/zh-tw/settings.php b/lib/plugins/authldap/lang/zh-tw/settings.php
new file mode 100644
index 000000000..e93190516
--- /dev/null
+++ b/lib/plugins/authldap/lang/zh-tw/settings.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Chinese Traditional language file
+ *
+ * @author syaoranhinata@gmail.com
+ */
+$lang['server'] = '您的 LDAP 伺服器。填寫主機名稱 (<code>localhost</code>) 或完整的 URL (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'LDAP 伺服器端口 (若上方沒填寫完整的 URL)';
+$lang['usertree'] = '到哪裏尋找使用者帳號?如: <code>ou=People, dc=server, dc=tld</code>';
+$lang['grouptree'] = '到哪裏尋找使用者群組?如: <code>ou=Group, dc=server, dc=tld</code>';
+$lang['userfilter'] = '用於搜索使用者賬號的 LDAP 篩選器。如: <code>(&(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = '用於搜索群組的 LDAP 篩選器。例如 <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = '使用的通訊協定版本。您可能要設置為 <code>3</code>';
+$lang['starttls'] = '使用 TLS 連接嗎?';
+$lang['referrals'] = '是否允許引用 (referrals)?';
+$lang['binddn'] = '非必要綁定使用者 (optional bind user) 的 DN (匿名綁定不能滿足要求時使用)。如: <code>cn=admin, dc=my, dc=home</code>';
+$lang['bindpw'] = '上述使用者的密碼';
+$lang['userscope'] = '限制使用者搜索的範圍';
+$lang['groupscope'] = '限制群組搜索的範圍';
+$lang['groupkey'] = '以其他使用者屬性 (而非標準 AD 群組) 來把使用者分組,例如以部門或電話號碼分類';
+$lang['debug'] = '有錯誤時,顯示額外除錯資訊';
diff --git a/lib/plugins/authldap/lang/zh/settings.php b/lib/plugins/authldap/lang/zh/settings.php
new file mode 100644
index 000000000..3f38deae9
--- /dev/null
+++ b/lib/plugins/authldap/lang/zh/settings.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Chinese language file
+ *
+ * @author lainme <lainme993@gmail.com>
+ */
+$lang['server'] = '您的 LDAP 服务器。填写主机名 (<code>localhost</code>) 或者完整的 URL (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'LDAP 服务器端口 (如果上面没有给出完整的 URL)';
+$lang['usertree'] = '何处查找用户账户。例如 <code>ou=People, dc=server, dc=tld</code>';
+$lang['grouptree'] = '何处查找用户组。例如 <code>ou=Group, dc=server, dc=tld</code>';
+$lang['userfilter'] = '用于搜索用户账户的 LDAP 筛选器。例如 <code>(&(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = '用于搜索组的 LDAP 筛选器。例如 <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = '使用的协议版本。您或许需要设置为 <code>3</code>';
+$lang['starttls'] = '使用 TLS 连接?';
+$lang['referrals'] = '是否允许引用 (referrals)?';
+$lang['binddn'] = '一个可选的绑定用户的 DN (如果匿名绑定不满足要求)。例如 <code>cn=admin, dc=my, dc=home</code>';
+$lang['bindpw'] = '上述用户的密码';
+$lang['userscope'] = '限制用户搜索的范围';
+$lang['groupscope'] = '限制组搜索的范围';
+$lang['groupkey'] = '根据任何用户属性得来的组成员(而不是标准的 AD 组),例如根据部门或者电话号码得到的组。';
+$lang['debug'] = '有错误时显示额外的调试信息';
diff --git a/lib/plugins/authldap/plugin.info.txt b/lib/plugins/authldap/plugin.info.txt
new file mode 100644
index 000000000..94809a75b
--- /dev/null
+++ b/lib/plugins/authldap/plugin.info.txt
@@ -0,0 +1,7 @@
+base authldap
+author Andreas Gohr
+email andi@splitbrain.org
+date 2013-04-19
+name ldap auth plugin
+desc Provides authentication against am LDAP server
+url http://www.dokuwiki.org/plugin:authldap