summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipa_server/plugins/b_ldap.py10
-rw-r--r--ipalib/config.py4
2 files changed, 13 insertions, 1 deletions
diff --git a/ipa_server/plugins/b_ldap.py b/ipa_server/plugins/b_ldap.py
index 827e25120..6383bb0b5 100644
--- a/ipa_server/plugins/b_ldap.py
+++ b/ipa_server/plugins/b_ldap.py
@@ -35,4 +35,14 @@ class ldap(Backend):
dn = _ldap.dn
+ def get_user_dn(self, uid):
+ """
+ Construct user dn from uid.
+ """
+ return 'uid=%s,%s,%s' % (
+ self.dn.escape_dn_chars(uid),
+ self.api.env.container_user,
+ self.api.env.basedn,
+ )
+
api.register(ldap)
diff --git a/ipalib/config.py b/ipalib/config.py
index a0a33b401..c55c47c8a 100644
--- a/ipalib/config.py
+++ b/ipalib/config.py
@@ -25,13 +25,15 @@ DEFAULT_CONF='/etc/ipa/ipa.conf'
def generate_env(d={}):
default = dict(
- server_context = False,
+ server_context = True,
query_dns = True,
verbose = False,
interactive = True,
server = LazyIter(get_servers),
realm = LazyProp(get_realm),
domain = LazyProp(get_domain),
+ container_user='cn=users,cn=accounts',
+ basedn='dc=example,dc=com',
)
for key, value in d.iteritems():
if key in default and type(default[key]) in (LazyIter, LazyProp):