[plug] samba connection problems

Ari Finander outrider at operamail.com
Sun Feb 16 19:40:54 WST 2003


    

----- Original Message -----
From: "Craig Foster" <fostware at iinet.net.au>
Date: Sun, 16 Feb 2003 12:33:44 +0800
To: <plug at plug.linux.org.au>
Subject: RE: [plug] samba connection problems

> I'm late to the conversation, but try this...
> 
> E-Smith by default enables WINS server and then defaults to WINS for
> name resolutions first.
> (/etc/smb.conf - "wins support = yes" and "name resolve order = wins
> lmhosts bcast")

Progress!  maybe...
When I did this, it did not resolve the WinXP problem.  However, when I turned off the redhat8 iptables firewall I was able to get smbclient -L server2 to work from the e-smith box!  Even with the iptables turned off on server2, Winxp still gave the original error  :-(

> 
> Try adding "wins server = 192.168.0.2" to the redhat box. 

I can have either wins support = yes or wins server = 192.168.0.2, not both together in the smb.conf file.  testparm returns an error telling me this.  I tried the wins server = 192.168.0.2 instead, and this did not fix the Winxp box connection problem, but it did result in some interesting errors!  I should note, however, that the errors were caused by wins support = yes, even though I discovered them after playing with the setting wins server = 192.168.0.2  I went back and retraced my steps one at a time to come to this:

Firstly, when I did the /sbin/service smb restart it told me that a PID did not exist.  I'd seen this error before when mucking around with additions to the redhat8 smb.conf file that were taken from the e-smith smb.conf file.  ps -aux revealed two nmbd -D processes running after the restart.  Something about the setting wins support = yes was causing a second nmbd -D to run, which has to be manually killed (until it's manually killed, it'll keep messing things up after every restart).  

HOWEVER, when I use the wins server = 192.168.0.2 I get this error from e-smith:

[root at servie bin]# smbclient -L servie2
added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0
added interface ip=192.168.0.2 bcast=192.168.0.255 nmask=255.255.255.0
Got a positive name query response from 127.0.0.1 ( 192.168.0.3 )
error connecting to 192.168.0.3:139 (Connection refused)
Connection to servie2 failed

This is much different to the result when running samba with the wins support = yes option in smb.conf, which although it results in some quirky behavior as described above (with the extra nmbd -D processes that have to be manually killed) gives this from the e-smith box:

[root at servie bin]# smbclient -L servie2
added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0
added interface ip=192.168.0.2 bcast=192.168.0.255 nmask=255.255.255.0
Got a positive name query response from 192.168.0.3 ( 192.168.0.3 )
Password:
Anonymous login successful
Domain=[OURNETWORK] OS=[Unix] Server=[Samba 2.2.7]

        Sharename      Type      Comment
        ---------      ----      -------
        music          Disk      music
        downloads      Disk      downloads for windows
        linux          Disk      linux downloads
        aribackup      Disk      Ari's backup directory
        carobackup     Disk      Caroline's backup directory
        IPC$           IPC       IPC Service (Servie2)
        ADMIN$         Disk      IPC Service (Servie2)

        Server               Comment
        ---------            -------
        SERVIE2              Servie2

        Workgroup            Master
        ---------            -------
        OURNETWORK




This will
> force redhat8 to ask e-smith for the master browser list. It also limits
> the problem of WinXP caching netbios names long after machines have
> disappeared. By default samba tries to keep it's own MBL and combined
> with e-smith doing the same  there may be to lists of netbios names
> floating around. 
> 
> (don't forget the "service smb restart" :)

I do it after every change, or use /etc/rc.d/init.d/smb stop followed by /etc/rc.d/init.d/smb start

> 
> This happened to me when a clients nice heterogenerous Linux / Win2K AD
> system fell over. The Windows side came back to talking to Win2K only
> and therefore wouldn't play nicely with either Samba or it's login
> system (Winbind). Turning on WINS support *made* them talk nicely, and
> it's running as it should now.
> 
> I'd like to hear what "net view \\192.168.0.3"

With the wins server = 192.168.0.2 option in smb.conf, the above command gives an error 53 error (path not found).  The same thing happens with the wins support = yes option enabled instead.  With neither included in smb.conf, the same error occurs.  When I remove the line name resolve order = wins lmhosts bcast I get the same error yet again.


However, (just in case this is of interest) if I just type in net view, I get:
ARIXP default
SERVIE Mitel Networks SME Server
SERVER2 Server2



 and "net view \\server2"
> produces (listing shares on a server), and also "nbtstat -n" (listing
> netbios names chaced on Windows) and "nbtstat -A 192.168.0.3" (list
> netbios names given the server's IP address)

"nbstat is not recognised as an internal or external command, operable program or batch file" 

> 
> You could also rename the machine samba log, retry connecting, and then
> you can concentrate on the log of just one connection, rather than all
> this testing :)

I'm not sure I follow you...rename the computer, or just rename one of the many log files in the /var/log/smb directory?

Thanks, 

Ari


> 
> Regards,
> 
> Craig Foster
> fostware at iinet.net.au (with SMIME) 
> 
> > -----Original Message-----
> > From: Quintin Lette [mailto:quintin at arach.net.au] 
> > Sent: Sunday, February 16, 2003 11:58 AM
> > To: plug at plug.linux.org.au
> > Subject: Re: [plug] samba connection problems
> > 
> > 
> > ok..
> > As WIndows XP (and 2000) can use solely dns for resolution 
> > try adding an entry 
> > in C:\windows\system32\drivers\etc\hosts which says:
> > 
> > 192.168.0.3	Server2
> > 
> > Sorry I have been trying to not modify anything on the XP box 
> > but this should 
> > tell us something (and might even work)
> > 
<< smime.p7s >>

    
-- 
_______________________________________________
http://www.operamail.com
Now with OperaMail Premium for only US$29.99/yr

Powered by Outblaze



More information about the plug mailing list