Problemi con samba

Micky Del Favero micky@mesina.net
Mer 15 Set 2004 18:16:47 CEST


Ho un grosso problema con samba, fino all'altro ieri funzionava tutto
benissimo, poi di colpo non è più possibile discendere nelle directory
contenute nelle share di samba ma solo dalle macchine appartenenti al
dominio, per le macchine che si collegano da un dominio diverso via vpn
nessun problema, sul server linux non ho cambiato nulla tranne un
aggiornamento all'ultima sarge, mentre sul server di dominio, un 2003,
non so, non me ne occupo io (per fortuna), ad un certo punto sembrava di
aver risolto almeno in parte i problemi tranne che per gli exe, quando
si entrava in una directory che contiene un exe windows rimaneva in
attesa (con la clessidra al posto del mouse) finché non andava in
timeout, con smbstatus vedevo che:

root@pieve:/etc/samba# smbstatus -v
using configfile = /etc/samba/smb.conf

Samba version 3.0.6-Debian
PID     Username      Group         Machine                        
-------------------------------------------------------------------
Opened /var/run/samba/connections.tdb

Service      pid     machine       Connected at
-------------------------------------------------------
support       3317   10.241.33.70  Wed Sep 15 17:17:02 2004
IPC$          3246   10.241.37.9   Wed Sep 15 17:09:12 2004
4030          3258   10.241.33.73  Wed Sep 15 17:11:45 2004
4030          3174   ness          Wed Sep 15 16:58:53 2004
support.ab    3317   10.241.33.70  Wed Sep 15 17:17:02 2004
support.ab    3327   mobile        Wed Sep 15 17:18:12 2004
support       3258   10.241.33.73  Wed Sep 15 17:11:45 2004
Locked files:
Pid    DenyMode   Access      R/W        Oplock           Name
--------------------------------------------------------------
3327   DENY_NONE  0x20181     RDONLY     EXCLUSIVE+BATCH  /var/www/support.abc/Andrea/da pc demo/abiltz/setup.exe   Wed Sep 15 17:18:36 2004

root@pieve:/etc/samba# 

pensando ad un problema di locking ho tolto l'opzione locking = no nella
definizione degli share, ma ora windows dice "Impossibile connettere il
percorso di rete, contattare l'amministratore", o qualcosa del genere,
non ho accesso fisico alla macchina ne ai windows che sono a 150 Km da
me, questo è quanto mi hanno riferito telefonicamente, il mio smb.conf
è:

#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which 
# are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash) 
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not many any basic syntactic 
# errors. 
#

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

interfaces = 10.241.37.0/24 10.241.33.0/24 192.168.99.0/24 127.0.0.1/8 eth1 tun0 tun1 tun2
bind interfaces only = yes

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = ABC
   netbios name = PIEVE

# server string is the equivalent of the NT Description field
   server string = %h server (Samba %v)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
   wins support = no

# 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

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
;   name resolve order = lmhosts host wins bcast


#### Debugging/Accounting ####

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

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

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
;   syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 128

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/ServerType.html in the samba-doc
# package for details.
   security = share

# You may wish to use password encryption.  See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
   encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.  
   passdb backend = tdbsam guest

   obey pam restrictions = yes

   guest account = www-data
   invalid users = root

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
;   unix password sync = no

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Augustin Luton <aluton@hybrigenics.fr> for
# sending the correct chat script for the passwd program in Debian Potato).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
;   pam password change = no

######## File sharing ########

# Name mangling options
;   preserve case = yes
;   short preserve case = yes


############ Misc ############

# 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 = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
#         SO_RCVBUF=8192 SO_SNDBUF=8192
   socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
;   domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

#======================= Share Definitions =======================

[support.abc]
   comment = support.abc
   path = /var/www/support.abc
   public = yes
   locking = no
   force user = www-data
   force group = www-data
   read only = no
   writable = yes
   guest ok = yes

[support]
   comment = support
   path = /var/www/support
   public = yes
   locking = no
   force user = www-data
   force group = www-data
   read only = no
   writable = yes
   guest ok = yes

[4030]
   comment = 4030
   path = /var/www/support/4030
   public = yes
   locking = no
   force user = www-data
   force group = www-data
   read only = no
   writable = yes
   guest ok = yes

nei log leggo: 

log.nmbd

[2004/09/15 17:48:20, 0] nmbd/nmbd.c:main(664)
  Netbios nameserver version 3.0.6-Debian started.
  Copyright Andrew Tridgell and the Samba Team 1994-2004
[2004/09/15 17:53:44, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)
  *****
  
  Samba name server PIEVE is now a local master browser for workgroup ABC on
 subnet 192.168.99.166
  
  *****

log.smbd

[2004/09/15 17:45:42, 0] lib/util_sock.c:get_peer_addr(1000)
  getpeername failed. Error was Transport endpoint is not connected
[2004/09/15 17:48:20, 0] smbd/server.c:main(760)
  smbd version 3.0.6-Debian started.
  Copyright Andrew Tridgell and the Samba Team 1992-2004

log.mobile

[2004/09/15 17:19:43, 1] smbd/service.c:make_connection_snum(648)
  mobile (10.241.33.13) connect to service support.abc initially as user www-data (uid=33, gid=33) (pid 3346)
[2004/09/15 17:21:14, 1] smbd/service.c:close_cnum(837)
  mobile (10.241.33.13) closed connection to service support.abc


Qualcuno ha qualche idea di come risolvere 'sto casino che non sia
sostituire 2003 server con un'altro samba?

Grazie, Micky
-- 
Micky Del Favero  micky@mesina.net  micky@linux.it
Linux Registered User #78384 http://counter.li.org


Maggiori informazioni sulla lista blug