1

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

CapBird
  • 33
  • 5

1 Answers1

0

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

adcli info domain.com | grep computer-site
Max
  • 792
  • 1
  • 8
  • 20