rjancewicz / python-kadmin

Python module for kerberos admin (kadm5)
MIT License
35 stars 40 forks source link

Unable to Unlock Kerberos Principal #68

Open deepakthota opened 3 years ago

deepakthota commented 3 years ago

While using python-kadmin to administer kerberos principals(users), I am trying to use unlock method for unlocking a user but when I call the method, the call abruptly ends and terminates the python process. There is no exception, no error of any sorts just complete shutdown of the process. Below is my code:

(Pdb) import kadmin
(Pdb) kadmin_obj = kadmin.init_with_password(app.config['KADMIN_USER'], app.config['KADMIN_PWD'])
(Pdb) kadmin_obj.unlock()

I am using docker run the process and dependencies are as follows:

yum install -y python3 python3-devel gcc krb5-devel glibc
pip3 install python-kadmin
deepakthota commented 3 years ago

@limburgher @rjancewicz, Can you guys please help me with this issue?

limburgher commented 3 years ago

Does this code work not in a container? That might be the issue.

deepakthota commented 3 years ago

@limburgher I implemented the method outside the container and I am getting a different error. I tested the unlock method again in container and the result is same(the new error that is!) instead of previous issue where the process is quitting without an error or message.

Here is the error I am getting: *** SystemError: <built-in method unlock of kadmin.Principal object at 0x7f17720a7134> returned NULL without setting an error