Linux / VMware / Samba Setup

The information presented here came from my experience in setting up a system at work. This system was/is a Dell GX110 Pentium 3. At this current place of employment they are still using a Token-Ring. I experienced a few embarrassing moments during this setup but it was worth the experience. In the following text LNH refers to Linux host, VMH is VMware host and WNH is windows host. The Router or Gateway is referred to as GTW and the Wins Server is WNS. Now in some cases that is not exactly correct but it helps to show which platform is which. This is a SuSE Linux 7.1 system interfacing to a Windows newtork. I needed to perform some Windows specific operations so that is why VMware is involved. Some Credits

Samba Configuration for Linux.

#
# SMB config file for my system. Remember to be careful when setting
# things up with VMWare. You can get conflicts on the Samba parameters.
# You don't really want both running Samba!!! Comments in this file MUST
# be on lines of their own!!
#
# To stop and start on a SuSE system.
#   /etc/rc.d/smb stop
#   /etc/rc.d/smb start
#  Use "testparm" to check the settings.
#
# ======================= Global Settings ===============================
[global] 
; workgroup = put here the name of the domain as you see it in NETWORK NEIGHB.l 
    workgroup = WINSHS
    netbios name = DUSTY-TR
    server string = Samba SMB server 2.07
    os level = 33
    wins server = WNS.99.1.45
; USERS causes password probs..!!
    security = server
    preferred master = no
    socket options = TCP_NODELAY
    interfaces = LNH.168.1.1/255.255.255.0 WNH.99.74.230/255.255.255.0

# ============================ Share Declarations =======================
[homes]
    comment = Home Directories
    browseable = no
    writeable = yes
    create mode = 0750

[printers]
    comment = All Printers
    path = /var/spool/samba
    browseable = yes
    printable = yes
    public = no
    read only = yes
    create mode = 0700
    directory = /tmp

[WrkDev]
    comment = Directory for Work development.
    path = /home/ctaylor/WrkDev
    browseable = yes
    read only = no
    create mode = 0750

[public_html]
    comment = Directory for HTML work
    path = /home/ctaylor/public_html
    browseable = yes
    read only = no
    create mode = 0755

Hosts file on Linux

#
# hosts         This file describes a number of hostname-to-address
#               mappings for the TCP/IP subsystem.  It is mostly
#               used at boot time, when no name servers are running.
#               On small systems, this file can be used instead of a
#               "named" name server.
# Syntax:
#    
# IP-Address  Full-Qualified-Hostname  Short-Hostname
#
# special IPv6 addresses

127.0.0.1       localhost
LNH.168.1.1     dusty-tr.trcomputing dusty-tr
VMH.168.1.102   dusty2.trcomputing   dusty2
WNH.99.74.230   taylorc.winshs   taylorc
::1             localhost ipv6-localhost ipv6-loopback
fe00::0         ipv6-localnet
ff00::0         ipv6-mcastprefix
ff02::1         ipv6-allnodes
ff02::2         ipv6-allrouters
ff02::3         ipv6-allhosts

Actual hostname is taylorc.

Boot Local on Linux

#! /bin/sh
#
# Copyright (c) 1996 SuSE GmbH Nuernberg, Germany.  All rights reserved.
#
# Author: Werner Fink , 1996
#         Burchard Steinbild , 1996
#
# /etc/init.d/boot.local
#
# script with local commands to be executed from init on system startup
#
. /etc/rc.config
#
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.
#
/sbin/ipchains -A forward -s LNH.168.1.1/24 -j MASQ

Resolve Config on Linux

#
# /etc/resolv.conf
#
domain trcomputing
nameserver DNS.99.62.71
nameserver DNS.99.62.73

Route Config on Linux

default GTW.99.74.1 0.0.0.0 tr0

Fstab on Linux

In the first part of the file there is the normal file system declarations. The last line in the file is an example of an smb entry. You will smbmount the Windows network entries similar in the way you would do a Net Use.
/dev/hda3       /               ext2    defaults 1 1
/dev/cdrom      /cdrom          auto    ro,noauto,user,exec 0 0
devpts          /dev/pts        devpts  defaults 0 0
/dev/fd0        /floppy         auto    noauto,user 0 0
proc            /proc           proc    defaults 0 0
/dev/hda1       /windows/C      ntfs    ro,noauto,user,umask=022 0 0
/dev/hda5       /windows/D      ntfs    ro,noauto,user,umask=022 0 0
/dev/hda6       /windows/E      vfat    noauto,user 0 0
/dev/hda4       swap            swap    defaults 0 2

//azshfsp00/gappdev   /gappdev  smbfs   \
               noauto,user,username=is783,password=b17fort    0     0

Top of Modules Configure on Linux

#
# YaST2: Network card
#
alias eth0 3c90x
alias eth1 off

#
# YaST2: Network card
#
alias tr0 oltr
alias scsi_hostadapter off
alias fb0 off

Network card(s) Configuration on Linux

0  Token-Ring   tr0     WNH.99.74.2301    255.255.255.0
1  Eternet      eth0    LNH.168.1.1       255.255.255.0
Hostname = taylorc   Domain name = winshs
Name server = DNS.99.62.71 & DNS.99.62.73
Routing = GTW.99.74.1

Networking portion of rc.config on Linux

#
# networking
#
# number of network cards: "_0" for one, "_0 _1 _2 _3" for four cards
#
NETCONFIG="_0 _1"

#
# contains all indices of active PCMCIA network devices
#
NETCONFIG_PCMCIA=""

#
# IP Adresses
#
IPADDR_0="WNH.99.74.230"
IPADDR_1="LNH.168.1.1"
IPADDR_2=""
IPADDR_3=""

#
# network device names (e.g. "eth0")
#
NETDEV_0="tr0"
NETDEV_1="eth0"
NETDEV_2=""
NETDEV_3=""

#
# parameteres for ifconfig, simply enter "bootp" or "dhcpclient" to use 
# the respective service for configuration
# sample entry for ethernet:
# IFCONFIG_0="192.168.81.38 broadcast 192.168.81.63 netmask \
       255.255.255.224"
#
IFCONFIG_0="WNH.99.74.230 broadcast WNH.99.74.255 netmask 255.255.255.0"
IFCONFIG_1="LNH.168.1.1 broadcast LNH.168.1.255 netmask 255.255.255.0"
IFCONFIG_2=""
IFCONFIG_3=""

#
# runtime-configurable parameter: forward IP packets.
# Is this host a router? (yes/no)
#
IP_FORWARD="yes"

Pass Words on Linux

cat /etc/passwd | mksmbpasswd.sh > /etc/smbpasswd

Networking on WinNT

Computer name =  dusty2
Workgroup  =  winshs
IP address =  VMH.168.1.102   255.255.255.0
Gateway  =  LNH.168.1.1
DNS hostname = dusty2
Domain  =  trcomputing
DNS Search Order = DNS.99.62.71  &  DNS.99.62.73
NO WINS SERVERS!!!
Adapter is Vmware simulated.

Hosts file on WinNT

#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows NT.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost
WNH.99.74.230   taylorc.WINSHS         taylorc
VMH.168.1.102   dusty2.trcomputing    dusty2
LNH.168.1.1     dusty-tr.trcomputing  dusty-tr
WNH.99.8.23     Notes4