Koozali.org: home of the SME Server

wins ping windows host name

Baddogg

wins ping windows host name
« on: November 26, 2003, 05:40:12 AM »
Hi!

I came across a curious problem; perhaps someone has the answer.  I have a test SME server at work and was thinking of writing a PHP MYSQL script to poll the LAN to compose a software database.  When attempting to use file_exists to peer into another hard drive using c$ (hidden share), I realized that name resolution was not happening on the SME box.  I edited smb.conf and restarted the service pointing "wins server = 10.0.0.20", the LAN wins server...

If I ping the IP, no problem; however, if I ping by net BIOS name, it comes back unknown host...

I would appreciate any input...

cheers,

Wes

Charlie Brady

Re: wins ping windows host name
« Reply #1 on: November 26, 2003, 06:11:30 PM »
Baddogg wrote:

> When attempting to use file_exists to
> peer into another hard drive using c$ (hidden share), I
> realized that name resolution was not happening on the SME
> box.  I edited smb.conf and restarted the service pointing
> "wins server = 10.0.0.20", the LAN wins server...
>
> If I ping the IP, no problem; however, if I ping by net BIOS
> name, it comes back unknown host...

Windows blurs the distinction between an Internet name (DNS) and a windows file sharing name (netbios), but linux does not. You shouldn't use WINS names for anything other than file sharing - which is why it doesn't work with ping.

If you really must use netbios names, then lookup WINS using nmblookup, then ping by IP address.

Charlie

Baddogg

Re: wins ping windows host name
« Reply #2 on: November 28, 2003, 04:01:55 PM »
May I inquire what, exactly does the wins server = entry in smb.conf do?  I can't seem to use it to mount remote shares, or as stated, use it to resolve names to IP addresses with ping.

I have a very specific purpose for being able to mount drives in succession and test for the existance of certain files and log the results into a mysql database to poll the network for software inventory.

Is the solution making an entry into hosts for each machine?

Thanks, Charlie for your prior explanation.  :)  It does help.

Thanks in advance to anyone for continuing this thread.

Baddogg