예제 #1
0
    def create_krb_user(username, password, k=None):
        handle = _pykadm5.init_with_password(kerberosServer["adminUser"], kerberosServer["adminPass"], None, None)

        t = username + "@" + kerberosServer["realm"]
        if not t in _pykadm5.get_principals(handle):
            return _pykadm5.create_principal(handle, username, password, {})
        else:
            return 1
예제 #2
0
 def change_krb_password(username, password):
     handle = _pykadm5.init_with_password(kerberosServer["adminUser"], kerberosServer["adminPass"], None, None)
     return _pykadm5.change_password(handle, username, password)
예제 #3
0
 def delete_krb_user(username, k=None):
     handle = _pykadm5.init_with_password(kerberosServer["adminUser"], kerberosServer["adminPass"], None, None)
     return _pykadm5.delete_principal(handle, username)