Re: Find AD hostname from Linux command line



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: 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)
  • Re: Question about Red Hat Linux Enterprise
    ... we have is running Windows 2000 Server ... Luckily running Apache + MySQL on a Linux system is not a lot ... MySQL database and injecting it back into the MySQL installation ...
    (comp.os.linux.networking)
  • Re: Sweet Success
    ... Let's continue to assume that I prefer Windows to anything else: ... neither Linux nor Windows may be the answer. ... While it may well be initially less expensive to install a Linux-based ... of Linux simultaneously, along with Windows Server, AIX, and OS/400. ...
    (RedHat)
  • Re: [Full-disclosure] 70 million computers are using Windows 98 right now
    ... Linux is definitely not a natural migration pathway. ... Windows 2000, Windows XP, and Mac OS X seem to work pretty ... > desktop to server. ... But then the persons across the sea just can't install ...
    (Full-Disclosure)
  • Re: Help w/ Not-booting Problem
    ... >No - setting the hostname is one element in the boot process. ... I have had a working system of RedHat Linux 7.2 for several months. ... >external DNS server on an adsl router! ... >You appear to have a networking problem. ...
    (comp.os.linux.misc)