Re: Find AD hostname from Linux command line



I don't want to turn off the Linux DHCP server from assigning the IP to
the Windows machine. And I have to allow the Active Directory to
continue to do whatever it is does when it assigns a "hostname" of the
form *.ad.mydomain.com. What I want to do is from the Linux server find
out what name the AD server assigned the Windows client given the
Windows client's IP address.

Yes, there are two different zones at work here: how do I query the AD
server to find out what it thinks the Windows machine name is? A simple
"nslookup 192.168.10.11" always returns the *.mydomain.com hostname,
whereas I want to get the *.ad.mydomain.com result.

Kurt wrote:
A couple of possibilities. Most likely the Linux DHCP server is assigning
the hostname that is being registered in DNS. You should be able to turn
that off on the DHCP server and the Windows box by default will use its
NetBIOS name (computername) as it's hostname.

If you do an nslookup from the Windows box you should get the same results
as you do on the Linux box. If not, then the source of the DNS names must be
different DNS servers. To check the hostname on an XP box, just type
"hostname' at the command prompt (at least that works on Server 2003).

Also, I'm not sure whether you were being specific in your post as far as
the reverse lookup resolution goes, but ad.mydomain.com and mydomain.com are
two different zones.

...kurt





<google@xxxxxxxxxxxx> wrote in message
news:1155341763.100719.139880@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
We have a large pool of Windows XP machines that receive their IP
addresses via a Linux-based DHCP server. These IP addresses are pooled
and are not statically assigned, so at any given moment a particular
machine can have any one of several IP addresses.

To minimize confusion, we have these Windows XP machine automatically
register themselves with the college's Active Directory, so, even
though the IP address for a given machine may change, its Windows
machine name does not change.

For example, I will set up a workstation with machine name "lancelot".
After it boots, if I log onto a Windows machine and do a ping against
"lancelot.ad.mydomain.com" I will get a response.

Now the problem: I have a Linux server that needs to know this
machine's Windows name (i.e., "lancelot") given the machine's (current)
IP address. If I do a simple nslookup on this IP address I get
something like "dhcp-27.mydomain.com" rather than the desired
"lancelot.ad.mydomain.com".

I understand I could use some kind of NETBIOS name resolution using
samba, but is there any other way? Is there a way to query the Active
Directory server directly using simple Linux tools to get the machine
name?


.



Relevant Pages

  • Re: 2003 Migration
    ... Best Practice Active Directory Design for Managing Windows Networks ... Windows Server 2003 Tools ... ensure that you have designed a DNS and Active ...
    (microsoft.public.windows.server.active_directory)
  • Re: i got 6 server in company which contains NT4 , windows 2000 , windowser 2003
    ... Best Practice Active Directory Design for Managing Windows Networks ... Windows Server 2003 Tools ... ensure that you have designed a DNS and Active ...
    (microsoft.public.windows.server.active_directory)
  • Re: Urgent Advise - [WildPacket]
    ... Best Practice Active Directory Design for Managing Windows Networks ... Windows Server 2003 Tools ... ensure that you have designed a DNS and Active ...
    (microsoft.public.windows.server.active_directory)
  • Re: NT to W2K3 Migration
    ... How to Upgrade from Windows NT Server 4.0 ... Best Practice Active Directory Design for Managing Windows Networks ...
    (microsoft.public.windows.server.active_directory)
  • Re: Future of IT in Lebanon
    ... It's the same Linux code base. ... Microsoft Office on a Windows server, it will install and run fine, the main ...
    (soc.culture.lebanon)

Loading