Bug 1339 - ntlm_auth with --require-membership-of crashes winbindd
Summary: ntlm_auth with --require-membership-of crashes winbindd
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: ntlm_auth tool (show other bugs)
Version: 3.0.4
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Andrew Bartlett
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-10 09:56 UTC by Jim Richey
Modified: 2005-08-24 10:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Richey 2004-05-10 09:56:28 UTC
Runing Samba 3.0.4 on Slackware Linux 9.0 with kernel 2.4.25. Works fine 
without --require-membership-of. This is a squid proxy server so I'm only 
running nmbd and winbindd. No smbd. 

Samba 3.0.4 is built with the following:
CFLAGS="-Wall -march=pentium2";export CFLAGS;./configure --with-winbind --with-
winbind-auth-challenge --with-ads --with-krb5=/usr/local --with-ldap --with-
libsmbclient --without-quotas

The domain controller is Windows 2000. Even though kerberos and ldap is in the 
configuration, the Samba system is defined in Active Directory as an NT member 
server.

The Samba Configuraton is:
# 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 (perhaps too
# many!) most of which are not shown in this example
#
# For a step to step guide on installing, configuring and using samba,
# read the Samba HOWTO Collection.
#
# 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 commentry 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 made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: REDHAT4
   workgroup = HIGHMARK

# Netbios Name
   netbios name = PROXYTEST

# server string is the equivalent of the NT Description field
   server string = Proxy Test Server

# Security mode. Defines in which mode Samba will operate. Possible
# values are share, user, server, domain and ads. Most people will want
# user level security. See the HOWTO Collection for details.
   security = domain

   encrypt passwords = yes

# NTLM Authentication
   client lanman auth = no
   client ntlmv2 auth = yes
   client plaintext auth = no
   lanman auth = no
   ntlm auth = no

# 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 = no

# 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, cups, sysv, plp, lprng, aix, hpux, qnx
;   printing = cups

# 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 = /usr/local/samba/var/log.%m
   log level = 1

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

# 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 = hmch1001 hmch1002 hmch1003 hmch1004 hmpg1010 hmpg1011

# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
;   realm = MY_REALM
;   realm = highmark.com

# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
;   passdb backend = tdbsam

# 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.
# Note: Consider carefully the location in the configuration file of
#       this line.  The included file is read at that point.
;   include = /usr/local/samba/lib/smb.conf.%m

# Most people will find that this option gives better performance.
# See the chapter 'Samba performance issues' in the Samba HOWTO Collection
# 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 SO_RCVBUF=8192 SO_SNDBUF=8192

# 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 = no

# 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 = no

# 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 = 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

# 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 = no

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The default is NO.
   dns proxy = no

# These scripts are used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
;  add user script = /usr/sbin/useradd %u
;  add group script = /usr/sbin/groupadd %g
;  add machine script = /usr/sbin/adduser -n -g machines -c Machine -
d /dev/null -s /bin/false %u
;  delete user script = /usr/sbin/userdle %u
;  delete user from group script = /usr/sbin/deluser %u %g
;  delete group script = /usr/sbin/groupdel %g

## Winbind
##

# What character should be used to separate the DOMAIN and Username
# for a Windows user.  The default is DOMAIN\user, but many people
# prefer DOMAIN+user
#   winbind separator = \

# specify the uid range which can be used by winbindd
# to allocate uids for Windows users as necessary
   idmap uid = 10000-50000

# specify the gid range which can be used by winbindd
# to allocate gids for Windows groups as necessary
   idmap gid = 10000-50000

   winbind enum users = yes
   winbind enum groups = yes

# Define a home directory to be given to passwd(5) style entries
# generated by libnss_winbind.so.  You can use variables here
   template homedir = /home/%D/%U

# Specify a shell for all winbind user entries return by the
# libnss_winbind.so library.
   template shell = /bin/sh

# specify use default domain
   winbind use default domain = yes

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



The command executed and reply is:
./ntlm_auth --username=jtest --password=jtestpass --require-membership-
of='highmark\testgroup'
Reading winbind reply failed! (0x01)
:  (0x0)



The output from log.winbindd:
[2004/05/10 12:36:00, 1] nsswitch/winbindd.c:main(843)
  winbindd version 3.0.4 started.
  Copyright The Samba Team 2000-2004
[2004/05/10 12:36:00, 1] nsswitch/winbindd_util.c:add_trusted_domain(180)
  Added domain HIGHMARK  S-0-0
[2004/05/10 12:36:00, 1] nsswitch/winbindd_util.c:add_trusted_domain(180)
  Added domain BUILTIN  S-1-5-32
[2004/05/10 12:36:00, 1] nsswitch/winbindd_util.c:add_trusted_domain(180)
  Added domain PROXYTEST  S-1-5-21-2163221023-1196279341-2292720769
[2004/05/10 12:37:42, 0] lib/fault.c:fault_report(36)
  ===============================================================
[2004/05/10 12:37:42, 0] lib/fault.c:fault_report(37)
  INTERNAL ERROR: Signal 11 in pid 5797 (3.0.4)
  Please read the appendix Bugs of the Samba HOWTO collection
[2004/05/10 12:37:42, 0] lib/fault.c:fault_report(39)
  ===============================================================
[2004/05/10 12:37:42, 0] lib/util.c:smb_panic2(1398)
  PANIC: internal error
[2004/05/10 12:37:42, 0] lib/util.c:smb_panic2(1406)
  BACKTRACE: 13 stack frames:
   #0 /usr/local/samba/sbin/winbindd(smb_panic2+0x1f5) [0x80e2176]
   #1 /usr/local/samba/sbin/winbindd(smb_panic+0x19) [0x80e1f7f]
   #2 /usr/local/samba/sbin/winbindd [0x80cccc5]
   #3 /usr/local/samba/sbin/winbindd [0x80ccd3d]
   #4 /lib/libc.so.6 [0x4026e218]
   #5 /usr/local/samba/sbin/winbindd [0x80874f8]
   #6 /usr/local/samba/sbin/winbindd(winbindd_pam_auth+0x785) [0x8087e1b]
   #7 /usr/local/samba/sbin/winbindd(strftime+0x1298) [0x807a048]
   #8 /usr/local/samba/sbin/winbindd(winbind_process_packet+0x27) [0x807a3e8]
   #9 /usr/local/samba/sbin/winbindd [0x807aec8]
   #10 /usr/local/samba/sbin/winbindd(main+0x59a) [0x807b562]
   #11 /lib/libc.so.6(__libc_start_main+0xbd) [0x4025d17d]
   #12 /usr/local/samba/sbin/winbindd(ldap_msgfree+0x71) [0x8079881]


Output from gdb:
Attaching to process 5797
Reading symbols from /usr/local/samba/sbin/winbindd...done.
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libpopt.so.0...done.
Loaded symbols for /usr/lib/libpopt.so.0
Reading symbols from /usr/lib/libcrypto.so.0...done.
Loaded symbols for /usr/lib/libcrypto.so.0
Reading symbols from /usr/local/lib/libldap.so.2...done.
Loaded symbols for /usr/local/lib/libldap.so.2
Reading symbols from /usr/local/lib/liblber.so.2...done.
Loaded symbols for /usr/local/lib/liblber.so.2
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /usr/local/lib/libsasl2.so.2...done.
Loaded symbols for /usr/local/lib/libsasl2.so.2
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/gconv/IBM850.so...done.
Loaded symbols for /usr/lib/gconv/IBM850.so
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
Reading symbols from /usr/lib/sasl2/libotp.so.2...done.
Loaded symbols for /usr/lib/sasl2/libotp.so.2
---Type <return> to continue, or q <return> to quit---
Reading symbols from /usr/lib/libdb-4.1.so...done.
Loaded symbols for /usr/lib/libdb-4.1.so
Reading symbols from /usr/lib/sasl2/libsasldb.so.2...done.
Loaded symbols for /usr/lib/sasl2/libsasldb.so.2
Reading symbols from /usr/lib/sasl2/libplain.so.2...done.
Loaded symbols for /usr/lib/sasl2/libplain.so.2
Reading symbols from /usr/lib/sasl2/libdigestmd5.so.2...done.
Loaded symbols for /usr/lib/sasl2/libdigestmd5.so.2
Reading symbols from /usr/lib/sasl2/libcrammd5.so.2...done.
Loaded symbols for /usr/lib/sasl2/libcrammd5.so.2
Reading symbols from /usr/lib/sasl2/libanonymous.so.2...done.
Loaded symbols for /usr/lib/sasl2/libanonymous.so.2
0x40311c3e in select () from /lib/libc.so.6
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x080dc05f in sid_copy ()
(gdb) c
Continuing.

Program received signal SIGABRT, Aborted.
0x4026e2f1 in kill () from /lib/libc.so.6
(gdb) c
Continuing.

Program exited with code 01.
Comment 1 Andrew Bartlett 2004-09-01 19:45:30 UTC
Recent patches slated for 3.0.7 (I think) should probably deal with this.

Can you grab an SVN checkout and confirm?
Comment 2 Jim Richey 2004-09-13 11:25:43 UTC
I just downloaded and built 3.0.7. Works fine now. Thank you! You and the Samba 
team do excellent work. 
Comment 3 Andrew Bartlett 2004-09-13 17:40:30 UTC
Confirmed fixed by reporter.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:16:19 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.