Bug 714 - PANIC: internal error when smbclient try to get account information
Summary: PANIC: internal error when smbclient try to get account information
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: smbclient (show other bugs)
Version: 3.0.0
Hardware: Other Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-03 23:22 UTC by Cyrus Tam
Modified: 2004-03-04 09:02 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 Cyrus Tam 2003-11-03 23:22:15 UTC
Dear all, 

I got the "PANIC: internal error" in the log file when using smbclient with kerberos

Samba 3.0 
krb5-1.3.1
openldap-2.1.16
nss_ldap-202
pam_ldap-157
Red Hat 9

Before the samba installation/configuration, the system is running
with nss_ldap, pam_ldap for local login, it's work fine

/etc/nsswitch.conf

passwd:     files ldap
shadow:     files ldap
group:      files ldap


then install and configure the MIT kerberos and samba 3
MIT kerberos :

./configure
make 
make install


/etc/krb5.conf
[logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log
 
[libdefaults]
 ticket_lifetime = 24000
 default_realm = MYDOMAIN.COM
# default_tkt_enctypes = des-cbc-md5
# default_tgs_enctypes = des-cbc-md5
 dns_lookup_realm = false
 dns_lookup_kdc = false
 
[realms]
 MYDOMAIN.COM = {
  kdc = pdc1.mydomain.com:88
  default_domain = mydomain.com
 }
 
[domain_realm]
 .mydomain.com = MYDOMAIN.COM
 mydomain.com = MYDOMAIN.COM
 
[kdc]
 profile = /var/kerberos/krb5kdc/kdc.conf
 
[appdefaults]
 pam = {
   debug = false
   ticket_lifetime = 36000
   renew_lifetime = 36000
   forwardable = true
   krb4_convert = false
 }




Samba 3:

./configure --prefix=/usr/local/samba --with-ads
--with-krb5=/usr/local --with-automount --with-smbmount --with-pam
--with-pam_smbpass --with-quotas --with-acl-support --with-winbind

make
make install


/usr/local/samba/lib/smb.conf
[global]
        workgroup = MYDOMAIN.COM
        netbios name = asdss1
        server string = File Server
        realm = MYDOMAIN.COM
        security = ADS
        encrypt passwords = Yes
        password server = pdc1
        log file = /var/log/samba/log.%m
        max log size = 20
        announce version = 4.0
        dns proxy = No
        hosts allow = 128.2. 10.2.
        follow symlinks = yes
        hide dot files = yes
        preserve case = No
        case sensitive = No
        default case = Lower
        deadtime = 240
        keepalive = 3600
        veto files = /.*/
        #hide dot files = yes

[homes]
       comment = Home Directories
       read only = No
       browseable = No

[share1]
        path = /tmp


computer account "asdss1" added to W2K AD 
kinit to administrator@MYDOMAIN.COM   is OK
net ads join -U adminstrator is OK


then i switch to another "user1", this user already exist in AD and
LDAP
and kinit for "user1" is OK

The problem is :
/usr/local/samba/bin/smbclient //asdss1/share1 -k -d 10

i got "Call returned zero bytes (EOF)" error

[2003/11/03 16:46:21, 2]
libsmb/cliconnect.c:cli_session_setup_kerberos(493)
  Doing kerberos session setup
[2003/11/03 16:46:21, 10]
libsmb/clikrb5.c:get_krb5_smb_session_key(385)
  Got KRB5 session key of length 16
[2003/11/03 16:46:21, 6] lib/util_sock.c:write_socket(407)
  write_socket(3,1506)
[2003/11/03 16:46:21, 6] lib/util_sock.c:write_socket(410)
  write_socket(3,1506) wrote 1506
[2003/11/03 16:46:21, 5] lib/util_sock.c:read_socket_with_timeout(272)
  read_socket_with_timeout: timeout read. EOF from client.
[2003/11/03 16:46:21, 10] lib/util_sock.c:receive_smb(512)
  receive_smb: length < 0!
[2003/11/03 16:46:21, 10] libsmb/clientgen.c:client_receive_smb(65)
  client_receive_smb failed
[2003/11/03 16:46:21, 5] lib/util.c:show_msg(456)
[2003/11/03 16:46:21, 5] lib/util.c:show_msg(466)
  size=0
  smb_com=0x0
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=0
  smb_flg2=0
  smb_tid=0
  smb_pid=0
  smb_uid=0
  smb_mid=0
  smt_wct=0
  smb_bcc=0
[2003/11/03 16:46:21, 10] intl/lang_tdb.c:lang_tdb_init(135)
session setup failed: Call returned zero bytes (EOF)





and "PANIC: internal error" in /var/log/samba/log.128.2.6.188

[2003/11/04 14:38:45, 7] rpc_parse/parse_prs.c:prs_debug(81)
          000328 pac_io_pac_signature_data pac data
[2003/11/04 14:38:45, 5] rpc_parse/parse_prs.c:prs_uint32(634)
              0328 type: ffffff76
[2003/11/04 14:38:45, 5] rpc_parse/parse_prs.c:prs_uint8s(721)
              032c signature: e8 c0 e8 76 07 68 7f 34 b2 57 b6 cf 4f 91 5b 4f
[2003/11/04 14:38:45, 3] smbd/sesssetup.c:reply_spnego_kerberos(178)
  Ticket name is [user1@MYDOMAIN.COM]
[2003/11/04 14:38:45, 5] lib/username.c:Get_Pwnam(288)
  Finding user MYDOMAIN.COM\user1
[2003/11/04 14:38:45, 5] lib/username.c:Get_Pwnam_internals(223)
  Trying _Get_Pwnam(), username as lowercase is mydomain.com\user1
[2003/11/04 14:38:45, 0] lib/fault.c:fault_report(36)
  ===============================================================
[2003/11/04 14:38:45, 0] lib/fault.c:fault_report(37)
  INTERNAL ERROR: Signal 11 in pid 18252 (3.0.0)
  Please read the appendix Bugs of the Samba HOWTO collection
[2003/11/04 14:38:45, 0] lib/fault.c:fault_report(39)
  ===============================================================
[2003/11/04 14:38:45, 0] lib/util.c:smb_panic(1400)
  PANIC: internal error
[2003/11/04 14:38:45, 0] lib/util.c:smb_panic(1407)
  BACKTRACE: 31 stack frames:
   #0 /usr/local/samba/sbin/smbd(smb_panic+0xfc) [0x818fc6c]
   #1 /usr/local/samba/sbin/smbd [0x818120f]
   #2 /lib/tls/libc.so.6 [0x420275c8]
   #3 /usr/lib/libldap.so.2(ldap_int_tls_start+0x6e) [0x40074c9e]
   #4 /usr/lib/libldap.so.2(ldap_int_open_connection+0x1bf) [0x4005951f]
   #5 /usr/lib/libldap.so.2(ldap_new_connection+0xab) [0x4006947b]
   #6 /usr/lib/libldap.so.2(ldap_open_defconn+0x41) [0x40058f51]
   #7 /usr/lib/libldap.so.2(ldap_send_initial_request+0xbe) [0x400690ae]
   #8 /usr/lib/libldap.so.2(ldap_sasl_bind+0x18c) [0x400620cc]
   #9 /usr/lib/libldap.so.2(ldap_simple_bind+0xac) [0x40062a7c]
   #10 /lib/libnss_ldap.so.2 [0x40570f0d]
   #11 /lib/libnss_ldap.so.2 [0x40570bda]
   #12 /lib/libnss_ldap.so.2 [0x40571a73]
   #13 /lib/libnss_ldap.so.2 [0x40571dcf]
   #14 /lib/libnss_ldap.so.2(_nss_ldap_getpwnam_r+0x4b) [0x4057262f]
   #15 /lib/tls/libc.so.6(getpwnam_r+0xe2) [0x420ab7b2]
   #16 /lib/tls/libc.so.6(getpwnam+0x72) [0x420ab1a2]
   #17 /usr/local/samba/sbin/smbd(getpwnam_alloc+0xe) [0x8186636]
   #18 /usr/local/samba/sbin/smbd [0x8185076]
   #19 /usr/local/samba/sbin/smbd(Get_Pwnam+0x3e) [0x81852b6]
   #20 /usr/local/samba/sbin/smbd [0x80a9e84]
   #21 /usr/local/samba/sbin/smbd [0x80aa590]
   #22 /usr/local/samba/sbin/smbd [0x80aa8a5]
   #23 /usr/local/samba/sbin/smbd(reply_sesssetup_and_X+0xa18) [0x80ab39c]
   #24 /usr/local/samba/sbin/smbd [0x80c3f25]
   #25 /usr/local/samba/sbin/smbd [0x80c4085]
   #26 /usr/local/samba/sbin/smbd(process_smb+0x76) [0x80c424a]
   #27 /usr/local/samba/sbin/smbd(smbd_process+0x150) [0x80c4d10]
   #28 /usr/local/samba/sbin/smbd(main+0x414) [0x81e5d38]
   #29 /lib/tls/libc.so.6(__libc_start_main+0xe4) [0x42015574]
   #30 /usr/local/samba/sbin/smbd(ldap_msgfree+0x81) [0x8080c21]




then i disable the nss_ldap by edit /etc/nsswitch.conf to

passwd:     files
shadow:     files
group:      files


and switch to another user "user2", this user already exist in AD, but
not in LDAP( It is a local account of my RedHat 9 )

kinit with "user2" is OK

then 
/usr/local/samba/bin/smbclient //asdss1/share1 -k -d 10

everything is fine 

What is wrong on smbclient to get system account information.


Thanks
Cyrus Tam
Comment 1 Gerald (Jerry) Carter (dead mail address) 2004-03-04 09:02:23 UTC
The crash is actually in the openldap client libs
(or possibly from args that nss_ldap is passing down).
Sorry.  Not our bug.