Bug 104222 - samba 3.0.0-6rc3 doesn't work with clumanager
samba 3.0.0-6rc3 doesn't work with clumanager
Status: CLOSED RAWHIDE
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: samba (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jay Fenlason
:
Depends On:
Blocks: 97942
  Show dependency treegraph
 
Reported: 2003-09-11 08:55 EDT by Lon Hohberger
Modified: 2014-08-31 19:25 EDT (History)
4 users (show)

See Also:
Fixed In Version: samba-3.0.0-10rc4.3E
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-09-16 10:40:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
dirty patch to fix nmbd behavior, 3.0.0rc3 (2.49 KB, patch)
2003-09-11 14:49 EDT, Lon Hohberger
no flags Details | Diff
Newer patch fixes nmbd -n <name> (was missing POPT_COMMON_CONNECTION in nmbd.c) (2.97 KB, patch)
2003-09-11 15:45 EDT, Lon Hohberger
no flags Details | Diff

  None (edit)
Description Lon Hohberger 2003-09-11 08:55:42 EDT
Latest samba package:

samba-3.0.0-6rc3.3E

smbclient and smbfs hang after failover.

Additionally:
- No anonymous browsing (may be a "Security" feature?)
- nmbd -n <foo> does not work properly when an IP address is specified as the
NetBIOS name

Potentially a bug in latest Samba; 2.2.8 (imported version from
dist-8.0.1/dist-9) worked.

Going to try older 3.0.0-2beta3 and see if this works.
Comment 2 Tim Burke 2003-09-11 09:08:16 EDT
Has it been determined whether this is a samba bug or a clumanager bug?
Comment 3 Lon Hohberger 2003-09-11 09:42:46 EDT
3.0.0rc3 requires changes to the default smb.conf.<sharename>.  For one, these
need to go into the [global] section to enable anonymous browsing:

        map to guest = Bad User
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

Anonymous browsing was disabled by default because it was a security problem.

Other findings:
- "nmbd -n <netbios_name>" doesn't seem to work.  nmbd uses the hostname as the
netbios name instead of the one specified on the command line!  This causes the
netbios name to no longer be available.

- the configuration option: "bind interfaces only = yes" does not seem to bind
only to the interfaces.  It binds to the list of interfaces as well as
INADDR_ANY, which causes failover to break - machines were connecting via the
VIP and probably getting responses via the main IP; so when the service was
disabled, ifconfig <VIP> down was *not* sufficient for disallowing further
connections/traffic.

Comment 4 Lon Hohberger 2003-09-11 14:48:53 EDT
For upstream maintainers:

<comments from lhh>

nmbd doesn't respect "-n <primary_netbios_name>" command line option

source/nmbd/nmbd.c:610 has POPT_COMMON_SAMBA,
	but there is no POPT_COMMON_CONNECTION (which may be why the -n
	is getting ignored?)

However, even if we place POPT_COMMON_CONNECTION in, the specified NetBIOS
name gets replaced by the local hostname:

* main() @ nmbd/nmbd.c:596 calls reload_nmbd_services() at line 673
* reload_nmbd_services() @ nmbd/nmbd.c:273 calls lp_load() at line 291
* lp_load() @ param/loadparam.c:3900 calls init_globals() at line 3919
* init_globals() @ param/loadparam.c:1277 calls
	set_global_myname(myhostname()) at line 1338

At this point, we set our NetBIOS name to our hostname.  That's fine for
initialization, but the command line option would have been parsed
earlier - thus, our "-n <...>" parameter is lost.

We then proceed to parse the configuration file and replace our NetBIOS
name with the "netbios name = foo" in the config file.

Was it intentional to disable parsing of "-n" ?

</comment>
Comment 5 Lon Hohberger 2003-09-11 14:49:36 EDT
Created attachment 94422 [details]
dirty patch to fix nmbd behavior, 3.0.0rc3
Comment 6 Lon Hohberger 2003-09-11 14:51:00 EDT
Logging time.
Comment 7 Lon Hohberger 2003-09-11 15:35:23 EDT
Hardy is also working on a workaround in redhat-config-cluster which would add a
generated netbios name parameter to /etc/samba/smb.conf.<sharename> when it gets
created:

- Use hostname of first service IP, if it exists, or
- Use first service IP if it doesn't.  (ugly, but should work)

This is the same behavior clumanager uses to determine the "netbios name" it
sends to nmbd on the command line:

nmbd -n <hostname_or_ip> -D -s /etc/samba/smb.conf.<sharename>

I added a Samba fix to clumanager in case someone doesn't like the generated
netbios parameter and wants to comment it out; clumanager-1.2.1 is in the pool.
Comment 8 Lon Hohberger 2003-09-11 15:45:15 EDT
Created attachment 94425 [details]
Newer patch fixes nmbd -n <name> (was missing POPT_COMMON_CONNECTION in nmbd.c)
Comment 10 Lon Hohberger 2003-09-16 11:47:22 EDT
New redhat-config-cluster w/o workaround: 1.0.0-5 in 3.0E removes workaround.

Note You need to log in before you can comment on or make changes to this bug.