Samba 4.0.7 different outcomes i386 vs amd64 accessing [homes]

Dewayne dewayne.geraghty at
Tue Jul 9 00:33:57 MDT 2013

I wonder if anyone can shed any light on a problem where I've built 
samba 4.0.7 on an i386 and amd64 machine; and two of the many tests 
have different results

The first failure occurs when I try to acquire the xidNumber, using 
ldapsearch, which is null; and later when there is a xidNumber, 
smbclient correctly accesses a share but not the user's [homes] share.

I've included the url for full build, samba run and test logs files,below. 

I'm afraid I'm stuck on how to proceed?  Except to use samba4 for 
Kerberos/PAC and samba3 for filesharing.

The first test is a failure to acquire a xidNumber

xidNumber failure
+ /usr/local/samba/bin/samba-tool user create fox f7
User 'fox' created successfully
+ /usr/local/samba/bin/wbinfo --name-to-sid fox
+ SID='S-1-5-21-2002793614-881968167-1911614541-1107 SID_USER (1)'
+ /usr/local/samba/bin/ldbsearch -H /usr/local/samba/private/idmap.ldb objectsid=S-1-5-21-2002793614-881968167-1911614541-1107

After all the tests are run, and I perform another ldbsearch I do get a xidNumber, 
which succeeds with smbclient when accessing a smb.conf share, but fails to 
access a [homes] share; which the i386 does do.

# /usr/local/samba/bin/ldbsearch -H /usr/local/samba/private/idmap.ldb objectsid=S-1-5-21-2002793614-881968167-1911614541-1107
# record 1
dn: CN=S-1-5-21-2002793614-881968167-1911614541-1107
cn: S-1-5-21-2002793614-881968167-1911614541-1107
objectClass: sidMap
objectSid: S-1-5-21-2002793614-881968167-1911614541-1107
xidNumber: 3000016
distinguishedName: CN=S-1-5-21-2002793614-881968167-1911614541-1107

However on the amd64, this test fails as follows:

+ /usr/local/samba/bin/samba-tool domain exportkeytab /tmp/fox.keytab --principal=fox at AS.LAN
+ kinit -t /tmp/fox.keytab fox
+ /usr/local/samba/bin/smbclient -k //t2/shares -c ls
Domain=[AS] OS=[Unix] Server=[Samba 4.0.7]
  .                                   D        0  Sat Jul  6 16:20:48 2013
  ..                                  D        0  Sat Jul  6 16:20:48 2013

                56328 blocks of size 1048576. 10778 blocks available
+ /usr/local/samba/bin/smbclient -k //t2/fox -c ls
Domain=[AS] OS=[Unix] Server=[Samba 4.0.7]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
+ kdestroy
+ ktutil -v -k /tmp/fox.keytab list

Vno  Type                     Principal   Date        Aliases
  1  des-cbc-crc              fox at AS.LAN  2013-07-09
  1  des-cbc-md5              fox at AS.LAN  2013-07-09
  1  aes128-cts-hmac-sha1-96  fox at AS.LAN  2013-07-09
  1  aes256-cts-hmac-sha1-96  fox at AS.LAN  2013-07-09
  1  arcfour-hmac-md5         fox at AS.LAN  2013-07-09

Further information:
1. The two builds (i386, amd64) are built on the same hardware, and 
differ only in their IP and hostnames.
2. Samba was downloaded from on July 2
3. each machine has [home] path /s4/homes
# ls -lrth /s4/homes
total 2
drwxrwxrwx  2 3000016  wheel   512B Jan  1  2010 fox
# ls -lrth /s4/
total 6
drwxr-xr-x  2 root  wheel   512B Jan  1  2010 shares
drwxr-xr-x  2 root  wheel   512B Feb  4 10:27 kits
drwxrwxrwx  3 root  wheel   512B Feb  4 10:55 homes

4. All prerequisites are also built using identical source and make 
parameters with the exception that the build of i386 is tuned 
for prescott cpu, and amd64 is tuned for core2.

I've included the following files at
* Samba build logs for both t4-i386-build-samba4.log.bz2, t5-amd64-build-samba4.log.bz2 - the build process
* Samba test logs t4-i386-test-samba4.log.bz2, t5-amd64-test-samba4.log.bz2 - test results log via "sh -x"
* Samba running logs t4-i386-samba-single-d5.log.bz2, t5-amd64-samba-single-d5.log.bz2 - log from "samba -i -M single -d 5"

These machines are specifically for testing Samba4, so if more information is required eg. Debug at 10. I'm happy to provide.

1. Linking sequence diverges at step 3346
< [3346/3799] Linking default/source4/heimdal_build/
< [3347/3799] Linking default/source4/heimdal_build/
< [3348/3799] Linking default/lib/util/
> [3346/3799] Linking default/nsswitch/libwbclient/
> [3347/3799] Linking default/lib/util/
> [3348/3799] Linking default/lib/socket/

2. The i386 build contains 9 lines more than the amd64 - though a diff is 1785 lines.
3. No other observations due to the large number of build differences on the two platforms
< default/librpc/gen_ndr/py_server_id.c: In function 'initserver_id':
< default/librpc/gen_ndr/py_server_id.c:215: warning: overflow in implicit constant conversion
< ../lib/util/time.c: In function 'unix_to_nt_time':
< ../lib/util/time.c:151: warning: comparison is always false due to limited range of data type
< ../source4/torture/smb2/durable_open.c: In function 'test_durable_open_alloc_size':
< ../source4/torture/smb2/durable_open.c:1595: warning: cast from pointer to integer of different size
< ../source4/torture/smb2/durable_open.c:1595: warning: cast from pointer to integer of different size
< ../source4/torture/ndr/samr.c: In function 'samr_changepassworduser3_w2k8r2_out_check':
< ../source4/torture/ndr/samr.c:297: warning: integer constant is too large for 'long' type

Regards, Dewayne.
Sydney, Australia (GMT +10 hours)

More information about the samba-technical mailing list