Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Determine proper called name with just IP?

15 views
Skip to first unread message

John Goggan

unread,
Jan 11, 2000, 3:00:00 AM1/11/00
to

I am trying to connect to some Win95 and WinNT shares on machines that I
sometimes only have the IP of. Is there any way to get the machine name so
that I can then connect to a share? Under NT, this seems to happen
automatically -- if you give an unknown host name, but specify the IP, it
dumps out the normal information including the proper host name. However,
with 95/98, all of the session requests file with "Called name not present."

As an example, say that there is a machine named "TEST" with the IP address of
192.168.1.2 out there that I want to connect to. However, I don't know that
it is named "TEST", I only know the IP. I do:

smbclient -L JustAGuess -I 192.168.1.2 -N

If it happens to be an NT box, I will get a response similar to the following:

===
session request to JUSTAGUESS failed (Called name not present)
Domain=[WORKGROUP] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0]

Sharename Type Comment
--------- ---- -------

Server Comment
--------- -------
TEST

Workgroup Master
--------- -------
WORKGROUP TEST
===

...I then know that it is actually named "TEST" and can connect properly.
However, if it is a 95/98 box, I get the following:

===
session request to JUSTAGUESS failed (Called name not present)
session request to *SMBSERVER failed (Called name not present)
===

...and I can't tell anything about it. I can't determine the host name, so I
can't connect to a share on it -- even if I have the proper share name (which
sometimes I do and sometimes I do not). It seems that with the IP, I should
be able to ask the machine what its NetBIOS name is, yes? Is there something
simple that I am missing?

Thanks...

- John...

Giulio Orsero

unread,
Jan 11, 2000, 3:00:00 AM1/11/00
to
In article <387b71ac$0$14...@news.voyager.net>,
John Goggan <jgo...@dcg.com> wrote:

> However, if it is a 95/98 box, I get the following:
>
> ===
> session request to JUSTAGUESS failed (Called name not present)
> session request to *SMBSERVER failed (Called name not present)
> ===

This is because samba and nt accept calls to the special name
*smbserver (when you use just the ip), while win9x does not.

Try
nmblookup -A ip.address.of.win9x
and then use the names that hopefully you receive to do
smbclient -L name


--
giu...@pobox.com


Sent via Deja.com http://www.deja.com/
Before you buy.

John Goggan

unread,
Jan 12, 2000, 3:00:00 AM1/12/00
to

Giulio Orsero wrote:
> This is because samba and nt accept calls to the special name
> *smbserver (when you use just the ip), while win9x does not.
>
> Try
> nmblookup -A ip.address.of.win9x
> and then use the names that hopefully you receive to do
> smbclient -L name

Hi there! Thanks for the suggestion. nmblookup -A appears to do what I want
-- I get results such as:

===Looking up status of 192.168.1.2
===received 3 names
=== AB <00> - B <ACTIVE>
=== WORKGROUP <00> - <GROUP> B <ACTIVE>
=== AB <03> - B <ACTIVE>
===num_good_sends=0 num_good_receives=0

...and these appears to be what I want. Wouldn't this mean that the host name
for 192.168.1.2 is AB? Or am I misinterpreting what the nmblookup output
means? If I then do a "smbclient -L AB -I 192.168.1.2 -N", I am still
getting:

===session request to AB failed (Called name not present)
===session request to *SMBSERVER failed (Called name not present)

Shouldn't the session request to AB be valid? Even if there were no shares or
anything available, it seems that the "smbclient -L AB ..." would at least
succeed and give some more data.

Sorry for my SMB ignorance here. Please fill me in on what I am not
understanding... :) Thanks!

- John...

Giulio Orsero

unread,
Jan 12, 2000, 3:00:00 AM1/12/00
to
On Tue, 11 Jan 2000 23:39:36 -0500, hai scritto:

>===Looking up status of 192.168.1.2
>===received 3 names
>=== AB <00> - B <ACTIVE>
>=== WORKGROUP <00> - <GROUP> B <ACTIVE>
>=== AB <03> - B <ACTIVE>
>===num_good_sends=0 num_good_receives=0
>...and these appears to be what I want. Wouldn't this mean that the
host name
>for 192.168.1.2 is AB? Or am I misinterpreting what the nmblookup
output
>means? If I then do a "smbclient -L AB -I 192.168.1.2 -N", I am still
>getting:
>===session request to AB failed (Called name not present)
>===session request to *SMBSERVER failed (Called name not present)

First of all, "nmblookup -A ip.address" on samba, is the same of
"nbtstat -A ip.address" on a win9x pc.

Yes, AB is the name you should use with smbclient.

The problem here is that a "normal" pc answers with at least 5 rows.
That pc is lacking the row with "AB <20>". This means that either it
has the tcp/ip-netbios broken/misconfigured or that it has
print-filesharing turned off.

If you try the above commands with other pc's you should see them
answering you with the <20> name too.

See if pc's of the same subnet can access that pc shares.

John Goggan

unread,
Jan 12, 2000, 3:00:00 AM1/12/00
to

Giulio Orsero wrote:
> First of all, "nmblookup -A ip.address" on samba, is the same of
> "nbtstat -A ip.address" on a win9x pc.
>
> Yes, AB is the name you should use with smbclient.
>
> The problem here is that a "normal" pc answers with at least 5 rows.
> That pc is lacking the row with "AB <20>". This means that either it
> has the tcp/ip-netbios broken/misconfigured or that it has
> print-filesharing turned off.
>
> If you try the above commands with other pc's you should see them
> answering you with the <20> name too.

Ah! Thanks for your help! You were correct and this solved it for me. A
couple of the remote PCs that I was connecting to were configured improperly.
Once I tested some more, I found that some had the additional rows that you
mentioned -- and those ones worked fine. Thanks again!

- John...

0 new messages