Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
nsupdate with active directory (GSS-TSIG)

kinit with a domain user:

kinit genadi@TEST.LOCAL

Ones you have a krbtgt you can run nsupdate in GSS-TSIG mode:

nsupdate -g

Examples:

Create A record:

Interactive:

nsupdate -g
> zone test.local.
> update add comp1.test.local. 86400 A 192.168.227.100
> send

One liner:

echo -e "update add comp1.test.local 86400 A 192.168.227.100 \nsend" | nsupdate -g

Create PTR record

Interactive:

nsupdate -g
> zone 227.168.192.in-addr.arpa.
> add 100.227.168.192.in-addr.arpa. 86400 PTR comp1.test.local.
> send

One liner:

echo -e "zone 227.168.192.in-addr.arpa.\n add 100.227.168.192.in-addr.arpa. 86400 PTR comp1.test.local. \nsend" | nsupdate -g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment