How to network a UNIX and Win9x system using TCP/IP and Samba

Introduction

I decided to post this information because it was unavailable to me when I wanted to a network my new PC running Win95 and my old PC running Linux. Connecting two Win95 systems is a no-brainer: they will network automatically. But configuring TCP/IP on a Win95 system to connect to a UNIX system: well, just keep reading...

The kind of people who will find this information useful:

Assumptions:

Summarized steps

You should be able to setup your Samba-served network by following these two summarized steps:

  1. Configure TCP/IP on the Win9x system.

  2. Configure TCP/IP and Samba on the UNIX system.

    I assume Samba has been installed but not configured. Only the part of TCP/IP that relates to the Samba-served network will be explained.

Step 1: Configure TCP/IP on the Win9x system

"Network" icon

Double-click "My Computer" icon, next "Control Panel" icon, and finally "Network" icon:


Network icon:

        Configuration: Client for Microsoft Networks

                Select "Client for Microsoft Networks"

                Click Add

                Select Service

                Click Add

                Select "File and printer sharing for Microsoft Networks"

                Click OK

        Configuration: TCPIP -> [ethernet card]

                Properties:

                        Select "Specify an IP address":

                                IP Address:     10.0.0.2
                                Subnet mask:    255.255.255.0

                WINS Configuration:

                        Select "Disable WINS Resolution"

                Gateway:

                        (everything left blank)

                Bindings:

                        Select "Client for Microsoft Networks"

                        Select "File and printer sharing for Microsoft Networks"

                DNS Configuration:

                        Select "Enable DNS"

                        Host: "butthead"                (name of Win9x system)

                        Domain: "bnb.org"               (same as UNIX domain)

                        DNS Server Search Order: (blank)

                        Domain Suffix Search Order: (blank)

                Advanced:

                        (everything left blank and unselected)

        Identification:

                Computer Name:  butthead                (name of Win9x system)

                Workgroup:      bnb.org                 (same as UNIX doman)

        Access Control:

                Share-level access control circled

LMHOSTS

In order to access the UNIX system from the Win9x system, the static IP address of the UNIX system must be specified for Win9x TCP/IP by editing LMHOSTS, eg:


10.0.0.1        beavis        #PRE #DOM:bnb.org

Step 2: Configure TCP/IP and Samba on the UNIX system

Here I will explain how to configure Samba. I am not going to bother explaining how to install or build Samba.

/etc/smb.conf

The following is a sample "/etc/smb.conf" that provides the ability to use Explorer on beavis's UNIX filesystem.

BTW, I think the most important lines start with "workgroup" and "interfaces".


[global]

workgroup = BNB.ORG
netbios name = beavis
server string = beavis Samba server
dns proxy = no
security = share
os level = 31
local master = yes
preferred master = yes
domain master = yes
interfaces = 10.0.0.2/255.255.255.0

preserve case = yes
short preserve case = yes

[unix]
 comment = UNIX partition
 path = /
 read only = no
 user = YOUR_UNIX_USER_NAME_ON_BEAVIS

[homes]
guest ok = yes
public = yes

/etc/*

Add the name and IP address of the Win9x system to "/etc/hosts":


10.0.0.2        butthead        butthead.bnb.org

Add this line to "/etc/resolv.conf":


search          bnb.org

Add this line to "/etc/networks":


bnb.org         10.0.0

Enabling IP routes on the Samba server

I use the following shell script to configure the Ethernet card and add IP routes. The first two "route add" lines adds IP routes to the UNIX system itself and to the Win9x system. The third "route add" adds an IP route for the broadcast address (the .255 suffix means broadcast) which is used by Samba.

#!/bin/sh

ifconfig eth0 `hostname` netmask 255.255.255.0 broadcast 10.0.0.255
route add 10.0.0.2 eth0
route add 10.0.0.3 eth0
route add 10.0.0.255 eth0

Finish

On the UNIX system: after modifying "/etc/smb.conf", restart the Samba server daemon:
type this command: "/etc/rc.d/init.d/smb restart".

On the Win9x system:
the idiots at Microsoft do not how know to support on-the-fly reconfiguration: so reboot the Win9x system.

When the Win9x system restarts, do not be disappointed if the UNIX system does not immediately appear in the Network Neighborhood. It probably won't. A known problem is that Win95 takes a long time to populate the Network Neighborhood. A shortcut is to right-click the Network Neightborhood and select "Find Computer" to search for the UNIX system, eg "beavis".

Win9x Registry

Win95A allowed plaintext authentication, but later versions of Windows do not. If plaintext authentication is not allowed, then a problem is that objects in Network Neighborhood that require user authentication can not be accessed, even if the correct password is entered. A dialog box will pop up forever asking for an impossible password.

A simple but less secure solution is change the "smb.conf" file so that the object has public access instead of user access.

A better more secure solution is to use the Windows registry editor. Climb thru the tree to select "VNSETUP" (these names are from Win98, Win95 names may vary):


HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Vxd\VNSETUP

Then choose Edit->New->DWORD to create "EnablePlainTextPassword". Choose "1" for its value.



© 1998 Jim Brooks