Getting Domain Controller (DC) Site name via Linux (windows "ntlest /sgetsite" equivalent)

396 views Asked by At

I'm trying to extract the domain controller site name

On as windows system you can simply run nltest /dsgetsite and get the name.

From the doc: "/dsgetsite Returns the name of the site in which the domain controller resides."

However, googling for a Linux alternative (E.G "Ubuntu") produced no results (nor did nslookup / dig / host). Also, the account is not allowed to install any 3rd party tools/packages, so we can use only native commands (I'm aware that there are many distros.)

Is there any Linux equivalent for getting the DC site name ?

Thanks

1

There are 1 answers

0
Max On

Querying the AD Site on Ubuntu can be done using the adcli command:

adcli info domain.com | grep computer-site