Where did I go wrong with this Samba configuration?

George Adams learningapache at my-Deja.com
Sun Jul 9 04:45:05 GMT 2000


I'm just about to give up in despair of getting Samba working on my network.  I've browsed through several books, HOWTOs and websites and still can't figure out what I'm doing wrong.  Before I quit, could someone double check this and maybe spot what I've missed?

First, let me describe my network.  Names and IP addresses have been changed to protect the innocent.  :-)

It's a small network consisting of 5 Windows 95 OSR2 machines and one Linux box.  The Linux machine (www.mydomain.com) is connected to the world via a DSL connection.  The 5 Win95 boxes connect to the Internet through the Linux box, using IPCHAINS masquerading.  The Linux box has two network cards - eth0 connects to the DSL and has a (static) IP address.  eth1 connects to the internal network and has an IP address of 192.168.1.1 .  The 5 Win95 machines have IP addresses from 192.168.1.2 - 192.168.1.6 .

All 5 Win95 machines have TCP/IP and NetBEUI installed and bound to their NICs.  All of them can share files with each other (workgroup: MYGROUP).  In addition, one of the machines (whose Win95 name is SECRETARY) shares a printer hooked into its printer port.  
( \\SECRETARY\LASERJET5 )

So far so good.

I've installed Samba 2.0.7 and use SWAT to generate a config file (shown at the bottom of this message).  At the moment, the Linux box shares a single directory as "public".  I've also created /etc/lmhosts to define the various machines on our network:

192.168.1.1     www
192.168.1.4     secretary
etc.

"testparm" finds no errors, and according to the following output, it appears that Samba is working correctly on the Linux box:

  > smbclient -U% -L www
  added interface ip=192.168.1.1 bcast=192.168.1.255 nmask=255.255.255.0
  added interface ip=127.0.0.1 bcast=127.0.0.255 nmask=255.255.255.0
  Domain=[MYGROUP] OS=[Unix] Server=[Samba 2.0.7]

        Sharename      Type      Comment
        ---------      ----      -------
        public         Disk      Public Files
        IPC$           IPC       IPC Service (Samba Server)
        lp             Printer

        Server               Comment
        ---------            -------
        WWW                  Samba Server

        Workgroup            Master
        ---------            -------
        MYGROUP              WWW

  > smbclient //www/public -U%
  added interface ip=192.168.1.1 bcast=192.168.1.255 nmask=255.255.255.0
  added interface ip=127.0.0.1 bcast=127.0.0.255 nmask=255.255.255.0
  Domain=[MYGROUP] OS=[Unix] Server=[Samba 2.0.7]
  smb: \> quit

Now here's where the trouble starts.  Try as I might, I *cannot* get the Linux and Windows machines to see each other.  For instance, "secretary" shares a directory called simply "c".  From the Linux side:

  > smbclient //secretary/c
  added interface ip=192.168.1.1 bcast=192.168.1.255 nmask=255.255.255.0
  added interface ip=127.0.0.1 bcast=127.0.0.255 nmask=255.255.255.0
  error connecting to 192.168.1.4:139 (Connection refused)
  Connection to secretary failed

The Linux box knows the IP address for "secretary" (from /etc/lmhosts presumably), but "secretary" doesn't seem to be listening...

  > nmblookup -d 2 '*'
  added interface ip=192.168.1.1 bcast=192.168.1.255 nmask=255.255.255.0
  added interface ip=127.0.0.1 bcast=127.0.0.255 nmask=255.255.255.0
  querying * on 192.168.1.255
  Got a positive name query response from 192.168.1.1 ( 192.168.1.1 )
  192.168.1.1 *<00>

And from the Windows machine "secretary":

  C:\> net use * //www/public
    Error 53: The computer name specified in the network path cannot be
    located.  Make sure you are specifying the computer name correctly,
    or try again later when the remote computer is available.

  C:\> net use * //192.168.1.1/public
    Error 53: The computer name specified in the network path cannot be
    located.  Make sure you are specifying the computer name correctly,
    or try again later when the remote computer is available.

Now, these machines CAN see each other - they can ping each other, and "secretary" has no problem going through the Linux box as its internet gateway.  But they refuse to see each other for file and printer sharing.

I've tried tweaking the settings in every way that I can think of.  I've tried it with and without the EnablePlainTextPassword Windows registry setting as well.  I've also tried creating a C:\WINDOWS\LMHOSTS files.  Nothing has changed, and I've run out of ideas.

Well, I have one last idea: Could IPCHAINS, in the process of handling the IP masquerading, somehow be preventing the NetBIOS connections from being made?  How can I find out?

So thanks to anyone who can help, before I throw in the towel!  

Below is listed the configuration for the Windows machines, and my /etc/smb.conf

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

Windows configuration:
  - Protocols installed: TCP/IP and NetBEUI
  - Service installed: MS Client and File/Print Sharing

  - General settings:
    - Workgroup: MYGROUP

  - TCP/IP settings:
    - IP Addresses: Static (192.168.1.2 - 192.168.1.4)
    - Gateway: 192.168.1.1
    - WINS Server: 192.168.1.1
    - DNS: (set to my ISP's DNS servers)
    - Bindings: Client for MS Networks, and File/Print Sharing

  - File/Print Sharing Settings:
    - File Sharing: On
    - Printer Sharing: On
    - Browse Master: Disabled (also tried with Automatic)

  - EnablePlainTextPassword registry setting:
    tried with it and without it - no difference.


/etc/smb.conf
-------------
[global]
        workgroup = MYGROUP
        server string = Samba Server
        interfaces = eth1 127.0.0.1/24
        security = SHARE
        log file = /var/log/samba/log.%m
        max log size = 50
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        os level = 65
        preferred master = Yes
        domain master = Yes
        dns proxy = No
        wins support = Yes
        guest account = smbuser
        hosts allow = 192.168.1. 127. 

[homes]
        comment = Home Directories
        read only = No
        browseable = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        print ok = Yes
        browseable = No

[public]
        comment = Public Files
        path = /home/public
        read only = No
        guest ok = Yes



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


More information about the samba mailing list