[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Freeipa-devel] [PATCH] 081 Missing krbprincipalname when uid is not set



When user_add command is executed without uid parameter filled, user
account is created without 'krbprincipalname' attribute. This renders
the user account unusable.

https://fedorahosted.org/freeipa/ticket/1279

>From 8bc3777e72590c665029e0d1e3698490b7a7dacd Mon Sep 17 00:00:00 2001
From: Martin Kosek <mkosek redhat com>
Date: Wed, 15 Jun 2011 13:41:41 +0200
Subject: [PATCH] Missing krbprincipalname when uid is not set

When user_add command is executed without uid parameter filled, user
account is created without 'krbprincipalname' attribute. This renders
the user account unusable.

https://fedorahosted.org/freeipa/ticket/1279
---
 ipalib/plugins/user.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index 03766a3817233f3798ce19f04579522ca6110a34..de1aa33f3eb12ddab162ab83e2a9fe2b1c6ca3ff 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -347,6 +347,7 @@ class user_add(LDAPCreate):
             home_dir = home_dir.replace('//', '/').rstrip('/')
             entry_attrs['homedirectory'] = home_dir
         entry_attrs.setdefault('krbpwdpolicyreference', 'cn=global_policy,cn=%s,cn=kerberos,%s' % (api.env.realm, api.env.basedn))
+        entry_attrs.setdefault('krbprincipalname', '%s %s' % (entry_attrs['uid'], api.env.realm))
 
         if 'gidnumber' not in entry_attrs:
             # gidNumber wasn't specified explicity, find out what it should be
-- 
1.7.5.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]