-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace kadmin.py with python-kadmin #14
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My $0.02.
self.kadmin = kadmin.KAdmin(config["krb5"]["aprinc"], | ||
config["krb5"]["atab"]) | ||
self.kadm = kadmin.init_with_keytab(config["krb5"]["aprinc"], | ||
config["krb5"]["atab"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be keytab, and should default if unset to the system keytab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by "this should be keytab"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/atab/keytab/
But really it shouldn't be set at all. Its pretty standard to just use the system keytab for applications that are binding with machine level access.
@@ -113,7 +113,7 @@ def connectLDAP(self): | |||
return conn | |||
|
|||
def chPassword(self, username, password): | |||
return self.kadmin.chPassword(username, password) | |||
return self.kadm.get_princ(username).change_password(password) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be split into 2 calls with a try/except. If the get_princ() call fails you'll be trying to call a method on None
.
Merged. |
Reopened due to issues with kadmin. Will retest and reconsider at a later date. |
No description provided.