kadminutils
kadmin.local wrapper
Install
pip install kadminutils
Requirements
The library wraps the command kadmin.local and kinit, so you must put these two command in PATH.
Functions
- list_principals
- delete_principal
- change_password
- get_principal
- rename_principal
- ktadd
- check_password
Example
import kadminutils
import uuid
import os
realm = os.environ.get("KRB5REALM", "EXAMPLE.COM")
principal = str(uuid.uuid4()) + "@" + realm
principal2 = str(uuid.uuid4()) + "@" + realm
password = str(uuid.uuid4())
r1 = kadminutils.add_principal(principal)
print(r1)
r2 = kadminutils.change_password(principal)
print(r2)
r3 = kadminutils.change_password(principal, password)
print(r3)
r4 = kadminutils.get_principal(principal)
print(r4)
r5 = kadminutils.rename_principal(principal, principal2)
print(r5)
r6 = kadminutils.check_password(principal2, password)
print(r6)
r7 = kadminutils.ktadd("/tmp/a.keytab", [principal2])
print(r7)
r8 = kadminutils.delete_principal(principal2)
print(r8)
r9 = kadminutils.list_principals()
print(r9)
os.unlink("/tmp/a.keytab")
Releases
v0.2.4 2021/12/03
- First release.
Metadata
Release files for kadminutils 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kadminutils-0.2.4.tar.gz | 3.7 kB | Without provenance | Details for kadminutils-0.2.4.tar.gz |
Release files / kadminutils-0.2.4.tar.gz
| Download URL | kadminutils-0.2.4.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
deabde5fcb0e0a4d531461649cd82db039bba31bad640b0ba55e4c34d111f58f
|
|
BLAKE2b-256 checksum How to use checksums |
e6da52e408dd8f16f0cbfa5c867f8cb4835bc1bd4515134e8fbbbfb960ed6274
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Security for kadminutils 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.