[PATCH] An option in 'net ads dns' command to remove a DNS hostname

Hemanth Thummala hemanth.thummala at nutanix.com
Tue Mar 8 18:52:04 UTC 2016

Currently domain leave (net ads leave) is not taking care of dns unregister. I am not sure if this is intentional. It would be good to cleanup the DNS entries once we are leaving the domain. This unregister code can be more useful during domain leave.


On 3/7/16, 6:12 PM, "samba-technical on behalf of Shyam Rathi" <samba-technical-bounces at lists.samba.org on behalf of shyam.rathi at nutanix.com> wrote:

>I did not find a way to remove a DNS hostname from a server using ‘net ads dns’ command. It has only two options, ‘register’ and ‘gethostbyname’. I’ve added a third option ‘unregister’ to remove a hostname as well, which can be used to revert the DNS entries added with ‘register’ option.
>nutanix at NTNX-10-4-136-71-A-NVM:~$ sudo net ads dns
>Invalid command: net ads dns
>net ads dns register        Add host dns entry to AD
>net ads dns unregister      Remove host dns entry from AD
>net ads dns gethostbyname   Look up host
>Attached the patch on top of latest master:

More information about the samba-technical mailing list