# Yo! Is there an MCSE in da house? W2K-SMB acting up!

## plate

The setup should be fairly simple, and it does work partly. I can mount a shared /home from the Linux host daimyo on the W2K laptop ronin, and I can see the CUPS printer on daimyo (and get "connection refused", but that's probably a different story). However, I cannot access anything on ronin from daimyo, no file shares, no printers, and what it shows when I try to run a diagnose is plain weird, I swear. This Windoze machine remembers an IP address that was installed temporarily for use in somebody else's office network months ago  :Exclamation:  (Real world IP address masked to protect innocent bystanders) 

```
# netstat -a | grep netbios-ssn

tcp        0      0 *:netbios-ssn           *:*                     LISTEN

tcp        0      0 192.168.1.3:netbios-ssn 192.168.1.2:1029        ESTABLISHED

# smbclient -L ronin

added interface ip=192.168.1.3 bcast=192.168.1.255 nmask=255.255.255.0

timeout connecting to 999.999.999.209:139

Error connecting to 999.999.999.209 (Operation already in progress)

Connection to ronin failed

```

Where lieth the shallow grave whence that ghost of network past has risen?   :Shocked:  Will gladly share any number of .conf files with whoever takes up the gauntlet.

----------

## simcop2387

ok i dont know too much about this, but are you sure the two computer are on the same network, and the same subnet? i could be wrong but i think w2k might have issues if you arent on the same subnet

----------

## plate

There's only one network here, and I'm running DHCP across the board. No stray subnets except that weird shadow from the past nobody has used in months. I did mention W2K --> Linux works, didn't I? I even have one of dem DOS drive letters assigned to my shared ~/ on the Linux host, and can use it as a completely normal network drive from W2K, no problems whatsoever. User mapping works, Samba password is obviously accepted, network drive is mounted on booting the W2K, no problems whatsoever there. It's just printing to CUPS from the Windows laptop that doesn't work, and accessing shared services on W2K from Linux that goes belly up all the time. I've been poking around conf files directly, but the GUI tools aren't any smarter than I am: Komba2 doesn't even see the machine...  :Confused: 

----------

## klieber

Few things I would do:

Check the event viewer on Win2K to see if it's recording any related events.  That will tell you if the packets are even reaching the Win2K box at all.Check your /etc/host file to see if there's an entry for ronin that points to the wrong IP address (999.999....)  I doubt there is, but what the heygrep your various samba conf files for the 999 IP address.  If that fails, grep *all* files for that 999 IP address. (probably want to do this before you go to bed...)  For whatever reason, that IP is stored somewhere and that's probably what's causing your problem.Also, make sure you don't have that bum IP defined anywhere as a secondary IP address on the win2k box.  Just a stab in the dark.

--kurt

----------

## plate

Thanks a lot! 

The event viewer on ronin has never heard about daimyo, and in particular doesn't know diddley about any samba connection attempts.

Course not. Thanks for asking, though.   :Very Happy: 

Nothing in /etc/samba either. You want me to do what?   :Shocked: 

Argh. Yes.  Good point. But no, it's nowhere to be found, at least nowhere I'd know to look. The only occurrence of that IP number on ronin is in an old mail message in Outrage Depress.This really hasn't been my week... Samba stuck halfway through, Gentoo on my Macintosh completely falling apart - I ought to go back to cultivating roses or something...   :Sad: 

----------

## klieber

 *plate wrote:*   

> You want me to do what?  

 

Oh come on -- it's not that bad.  :Smile:   I probably should have said "grep all /etc files"...  make sure to use the -r option to grep recursively.

Since you said the questionable IP address used to be on the Windows machine, one has to suspect that as the cause of this problem...

If you ping ronin from daimyo, does that work?  (i.e. is name resolution working properly)

If you try to mount the share by IP address, does that work?

```
# smbclient -L <ronin's IP address>
```

You can also try placing an explicit entry in /etc/hosts for ronin.

Finally, you don't have anything funky in your Windows hosts files, do you?  Check the following files to see if there's any mention of the old IP in them:

```
c:\winnt\system32\drivers\etc\hosts

c:\winnt\system32\drivers\etc\lmhosts
```

The first file is the equivalent of /etc/hosts and the second one is the same thing, except for NetBIOS resolution.

--kurt

----------

## plate

OMG: 

```
uli@daimyo uli $ ping ronin

PING ronin.zok.jp (999.999.999.209): 56 octets data

64 octets from 999.999.999.209: icmp_seq=0 ttl=235 time=373.1 ms

64 octets from 999.999.999.209: icmp_seq=1 ttl=235 time=376.7 ms

64 octets from 999.999.999.209: icmp_seq=2 ttl=235 time=369.1 ms

--- ronin.zok.jp ping statistics ---

3 packets transmitted, 3 packets received, 0% packet loss

round-trip min/avg/max = 369.1/372.9/376.7 ms
```

Where the hell did that come from???

```

uli@daimyo uli $ smbclient -L 192.168.1.2

added interface ip=192.168.1.3 bcast=192.168.1.255 nmask=255.255.255.0

session request to 192.168.1.2 failed (Called name not present)

session request to 192 failed (Called name not present)

Password:

Domain=[TATAMI] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]

        Sharename      Type      Comment

        ---------      ----      -------

        IPC$           IPC       Remote IPC

        print$         Disk      v^ hCo

        HPLaserJ       Printer   HP LaserJet 4LJ Pro

        ADMIN$         Disk      Remote Admin

        C$             Disk      Default share

        EPSONLP        Printer   EPSON LP-1200

        Server               Comment

        ---------            -------

        Workgroup            Master

        ---------            -------

```

As my daughter says at this point: "Gakku".   :Shocked: 

Needless to say, c:\winnt\system32\etc\hosts knows only localhost at the loopback address, and there's no lmhosts file at all, just a sample file lmhosts.sam (three-letter-extension - cute in their own way, aren't they...). Not a trace of that address in /etc on daimyo, either.

----------

## klieber

 *plate wrote:*   

> 
> 
> ```
> uli@daimyo uli $ ping ronin
> 
> ...

 

OK, so now do:

```
#dig ronin
```

and you should get something like the following:

```
kurtl@z3 dhcp $ dig x5

; <<>> DiG 9.2.2rc1 <<>> x5

;; global options:  printcmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46598

;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:

;x5.                            IN      A

;; ANSWER SECTION:

x5.                     4476    IN      A       192.168.1.146

;; Query time: 18 msec

;; SERVER: 127.0.0.1#53(127.0.0.1)

;; WHEN: Fri Nov  8 10:29:13 2002

;; MSG SIZE  rcvd: 36
```

The "SERVER" line, third from the bottom, should tell you who is handing out that address.

Note, you may need to emerge bind-tools if dig isn't on your system.

--kurt

----------

## klieber

 *plate wrote:*   

> 
> 
> ```
> uli@daimyo uli $ ping ronin
> 
> ...

 

OK, I just figured it out.  "ronin.zok.jp" is a valid domain name -- I can ping it from my machine here and get the same IP address ending in 209.  So that's the problem.

Workaround:  place an entry in /etc/hosts that points to the correct IP address.

--kurt

----------

## plate

Great. Very efficiently shot myself in the foot while trying to comply with the standards. I did put everything in a domain I own, except that the (remote) DNS is pointing to my webserver out in the wild, and apparently it does that for all subdomains, not only www... And that stray IP address is not the number I was using when I was visiting that hosting company, it's my webserver... What's the emoticon for pulling out your own hair again?

Thanks, klieber! You've been a tremendous help  :Exclamation: 

----------

## klieber

 *plate wrote:*   

> What's the emoticon for pulling out your own hair again?

 

You mean it isn't your avatar?  :Laughing: 

--kurt

----------

## plate

rac is my witness, that's what I look like as long as I'm having things more or less under control.   At the stage of despair I currently am, my avatar should probably resemble an exploding porcupine.   :Twisted Evil: 

----------

