Displaying 2 results from an estimated 2 matches for "sambatooldnsapi".
2024 Jun 29
1
Looking for Python docs/examples to modify DNS via keytab
...instantiating a DNS server connection with a keytab.
It's a bit awkward, but you can import and call the samba-tool commands
directly within Python (samba-tool of course is written in Python). See
an example of this hack here:
https://github.com/yast/yast2-dns-manager/blob/master/src/modules/SambaToolDnsAPI.py
This example uses username/password for auth, but the CredentialsOptions
parser can be instructed to use the keytab, IIUC:
https://gitlab.com/samba-team/samba/-/blob/master/python/samba/getopt.py?ref_type=heads#L384
If you don't like this hacky approach, you could re-implement someth...
2024 Jun 28
2
Looking for Python docs/examples to modify DNS via keytab
Hello all,
I am looking to rewrite the shell script here (https://wiki.samba.org/index.php/Configure_DHCP_to_update_DNS_records) in Python.
Is anyone aware of any resources (docs, existing code, etc.) that may be useful in doing so? I?m not finding any introductory docs or simple code examples that show things like instantiating a DNS server connection with a keytab.
Thanks,
CB