Kerberos ticket in python without using a subprocess

I currently have the following code and it does the trick.

def negociateKRBticket():
    kinit = '/usr/bin/kinit'
    kinit_args = [kinit, '-kt', KEYTAB_PATH , USER_NAME]
    kinit = subprocess.Popen(kinit_args)
    kinit.wait()

Although I want to start using something more "pythonic" than a system call. How can I refuse to use a subprocess for this?

+4
source share

All Articles