LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-31-2004, 04:56 PM   #1
fireman949
Member
 
Registered: Dec 2003
Location: Walls
Distribution: Slackware 10.1;CentOS 4
Posts: 51

Rep: Reputation: 15
Using Samba - conflicts with W2k and XP. Can't see the linux box - strange problem.


I am having trouble getting Samba to cooperate with my Windows Machines. Here is my setup:

WinXP Home SP1 (GATEWAY on network)
Win2K Server (WEBSERVER on network)
Linux Slackware 9 command line only. (LINUXBOX on network)

smbd -V
Version 2.2.8

With Samba not running, Viewing Network Neighborhood on my XP box shows 2 machines:
GATEWAY and
WEBSERVER

If I run nmbd -D and smbd -D, viewing network neighborhood still shows 2 machines but here is what I see:
GATEWAY and
LINUXBOX (WEBSERVER)

when I click on LINUXBOX (WEBSERVER) it prompts me for login and once logged in I see my W2K Server shares.

I have included a copy of my smb.conf

I actually have 2 of these, one located in /etc and one located in /etc/samba. Which one needs to stay?

Do I need to upgrade my Samba?

I know it's long but here it is:


Code:
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2
   workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
   server string = linuxbox

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
   hosts allow = 192.168.1. 192.168.2. 127.

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
#   load printers = yes

# you may wish to override the location of the printcap file
;   printcap name = /etc/printcap

# on SystemV system setting printcap name to lpstat should allow
# you to automatically obtain a printer list from the SystemV spool
# system
;   printcap name = lpstat
 # It should not be necessary to specify the print system type unless
# it is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
;   printing = bsd

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
  guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba.%m

# Put a capping on the size of the log files (in Kb).
   max log size = 50

# Security mode. Most people will want user level security. See
# security_level.txt for details.  NOTE:  To get the behaviour of
# Samba-1.9.18, you'll need to use "security = share".
   security = user

# Use password server option only with security = server
# The argument list may include:
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
#   password server = *
;   password server = <NT-Server-Name>
 Note: Do NOT use the now deprecated option of "domain controller"
# This option is no longer implemented.

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
  encrypt passwords = yes

# Where to find the SSL certificates:
   ssl CA certDir = /etc/ssl/certs

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /usr/local/samba/lib/smb.conf.%m

# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
# You may want to add the following on a Linux system:
#         SO_RCVBUF=8192 SO_SNDBUF=8192
   socket options = TCP_NODELAY

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
;   interfaces = 192.168.12.2/24 192.168.13.2/24

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
   local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
;   os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
;   domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
;   preferred master = yes

# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
;   domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
;   logon script = %m.bat
# run a specific logon batch file per username
;   logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
#        %L substitutes for this servers netbios name, %U is username
#        You must uncomment the [Profiles] share below
;   logon path = \\%L\Profiles\%U

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
;   wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
#       Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
#   wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one  WINS Server on the network. The default is NO.
;   wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
   dns proxy = no

#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = yes
   writable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
 [netlogon]
   comment = Network Logon Service
   path = /usr/local/samba/lib/netlogon
   guest ok = yes
   writable = no
   share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
;    path = /usr/local/samba/profiles
;    browseable = no
;    guest ok = yes


# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
# Set public = yes to allow user 'guest account' to print
   guest ok = no
   writable = no
   printable = yes

# This one is useful for people to share files
[tmp]
   comment = Temporary file space
   path = /tmp
   read only = no
   public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
;   comment = Public Stuff
;   path = /home/samba
;   public = yes
;   writable = yes
;   printable = no
;   write list = @staff

# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
wherever it is.
;[fredsprn]
;   comment = Fred's Printer
;   valid users = fred
;   path = /homes/fred
;   printer = freds_printer
;   public = no
;   writable = no
;   printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
;   comment = Fred's Service
;   path = /usr/somewhere/private
;   valid users = fred
;   public = no
;   writable = yes
;   printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
;  comment = PC Directories
;  path = /usr/pc/%m
;  public = no


# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
;   path = /usr/somewhere/else/public
;   public = yes
;   only guest = yes
;   writable = yes
;   printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
;   comment = Mary's and Fred's stuff
;   path = /usr/somewhere/shared
;   valid users = mary fred
;   public = no
;   writable = yes
;   printable = no
;   create mask = 0765
 
Old 01-31-2004, 07:43 PM   #2
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
I wouldn't start with Samba, I would start with confirming the other aspects of the set up on all of the machines first.

I say this because Usually Samba just works (at least as far as windows being able to see it when you login to the network at boot-up.)--but if and only if everything else is set up correctly.

Since there are only three machines, and hopefully all of them have unique names for each booted operating system, I personally would set everything with static private network IP Addresses. (Windows has a HOSTS.SAM file; you copy that as HOSTS without a suffix and use it just like in Linux.)

Exactly how are the machines connected to one another?
A hub? A switch?

What is your connection to the internet? High-speed or Dial-up?

Are the names you are reporting names assigned as the hostname of each box?

Have you set up the XP as the default-gateway on all of the machines?

Is the webserver local to your own LAN or is it exposed to the web?

Did you set up a local/private network?

Are you running static IP Addresses?

Exactly what services will each machine provide on the network?

Exactly what services are you going to be running on each machine?

Did you keep a log of all of the original default settings, and all of the changes you made--for each machine?

Are you going to be sharing printers or files between windows and Linux?
Otherwise, you don't need samba. You need to set up the windows boxes properly for the exact purposes you will need for them to have.

For a network to function:
You need to set up a private network IP-Address range and Fully Qualified Domain--with each device/computer having its own unique host-name.
/* A work-group is a number of machines/hosts assigned to a group, which resides on a (generally a private) network/Domain. */
You need a machine to provide routing services.
You really should have an assigned host for the private-network.
You need ether static IP-Addresses or the provision of DHCP.
You need a default-gateway to the outside world.
You need NAT to be provided by the host of the gate-way.

If all you have is NT-4, Win2000, and XP boxes, you still have to do some of these things--it is just that the process is hidden behind a wizard. The floppy the network setup wizard creates does nothing but assign these settings--generally, the one the wizard is run upon becomes the default-gateway, provides dhcp, NAT and other services for a small-all-windows network.(*1) This will work with a network switch-if you luck out(*2). It will not work with a hub. (With only two windows machines it may appear to work, and things may run, but it will be slow and buggy if it works at all. With or without the wizard.)

(*1) Other parts of this are taken care of by the windows services. If the wizard isn't run the machines will fight/auto-negotiate over who will serve as the host (or boss) of the network, then they will auto negotiate over the provision of the other services; during the negotiations, the private IP-addresses will be assigned.
(*2) Assuming you have a Cable or DSL modem plugged into one of the LAN-Ports of a switch or a hub--neither of which is a router. The easiest way out of that kind of dilemma is to just spend the $12 on another NIC for which ever box is going to be the gateway. Once you have that, wizards in XP or 2000 will set up much of it for you, then you just adjust the linux box to suit. Linux isn't really much harder to set up to do it; but frankly, if you are using a low-powered machine, you will see a drop in performance--regardless of the O.S.

I'm pointing that out because my Linux Workstation is an old P-II 350, and there was a noticable drop in performance when using the network HOST/NAT/FIREWALL/DHCP/Gateway/samba/file-serving, network-services on that box. I was kind of afraid to burn a cd with all that going on. One of these newer really powerful with over 512M of ram machines might not notice any lag-time at all.

/*NOTE: You may think I'm being pedantic here--but I'm not. When diagnosing any problem, (networking, software integration, or something wrong with a machine,) I have to force myself to "not think". I follow a very strict set of procedures to cover all of the basics of hardware, cabling, settings, and services, before I start to get more complex. I have to force my self not to assume anything--even on my own equipment.

There was a "critical" patch from MS a while back which drove me crazy, I had apparently random 100% usage of the CPU, and it was of short enough duration that I couldn't track the @#$@%!!! The longer I spent trying to track it down, the madder I got. Then, I called MS Support, and their solution (after bumping up a tier) was to have some moron try to talk me into a re-installation of the O.S..

Just after: I re-organized the files, checked the backups, verified the O.S. Image for the machine, set up the network for a maintenance shutdown of the machine, and zeroed out the hard drive; I realized I had applied the patches/critical-updates to a machine with customized settings in the registry and services. (I shut everything down I do not need or want on any machine I have.)

I am almost positive that the solution would have taken me about 6 minutes. What I should have tried first, after ruling out hardware, was to import the registry settings to revert them to default, then turned on all of the services as Automatic; then a reboot, then reapplied my customizations. Everything would have been fixed.

One thing I have learned from the past, alway revert to MS defaults before applying any patches to a Windows installation of any kind. I knew the answer, but because I started thinking from any point except the very beginning, I wasted time, spent 4 hours on the phone with MS--twice, got p*ssed off, and had a few miserable days.

Last edited by Eqwatz; 01-31-2004 at 08:26 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange error while connecting to w2k through samba BroX Slackware 5 07-01-2005 09:18 AM
Can't ping w2k server from linux box sam_vyas_linux Linux - Networking 3 09-16-2003 02:22 PM
Newbie adding Linux box to W2k Domain. Help. jstamp Linux - Networking 2 09-10-2003 02:55 PM
Samba problem, nmblookup not finding W2K box dwynter Linux - Networking 5 06-24-2003 02:44 PM
Samba Printing from w2k client to epson on linux box vance Linux - Networking 0 12-18-2001 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration