# Samba 4.3.8 on Freebsd 10.3-Release -P3  Provision Fails



## ayudante (May 20, 2016)

I have installed Samba 4.3.8 on FreeBSD 10.3-RELEASE-p3. The installation is in a jail using the same version as the host. I used pkg-install(8) command.

When I provision Samba using the following command:

`samba-tool domain provision --use-rfc2307 --interactive`

I get the following error:


```
ERROR(runtime): uncaught exception - pytalloc_reference_ex() called for object type not based on talloc
  File "/usr/local/lib/python2.7/site-packages/samba/netcmd/__init__.py", line 175, in _run
  return self.run(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/samba/netcmd/domain.py", line 442, in run
  nosync=ldap_backend_nosync, ldap_dryrun_mode=ldap_dryrun_mode)
  File "/usr/local/lib/python2.7/site-packages/samba/provision/__init__.py", line 2172, in provision
  skip_sysvolacl=skip_sysvolacl)
  File "/usr/local/lib/python2.7/site-packages/samba/provision/__init__.py", line 1864, in provision_fill
  attrs=['defaultObjectCategory'])
  File "/usr/local/lib/python2.7/site-packages/samba/dbchecker.py", line 138, in check_database
  error_count += self.check_object(object.dn, attrs=attrs)
  File "/usr/local/lib/python2.7/site-packages/samba/dbchecker.py", line 1358, in check_object
  normalised = self.samdb.dsdb_normalise_attributes(self.samdb_schema, attrname, [val])
  File "/usr/local/lib/python2.7/site-packages/samba/samdb.py", line 672, in dsdb_normalise_attributes
  return dsdb._dsdb_normalise_attributes(ldb, ldap_display_name, ldif_elements)
```

The installation stops at "Fixing provision GUIDs" and then the error happens.



```
Realm: pkg.test.com
Domain [pkg]:
Server Role (dc, member, standalone) [dc]:
DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]:
DNS forwarder IP address (write 'none' to disable forwarding) [192.168.16.10]:
Administrator password:
Retype password:
Looking up IPv4 addresses
Looking up IPv6 addresses
No IPv6 address will be assigned
Setting up share.ldb
Setting up secrets.ldb
Setting up the registry
Setting up the privileges database
Setting up idmap db
Setting up SAM db
Setting up sam.ldb partitions and settings
Setting up sam.ldb rootDSE
Pre-loading the Samba 4 and AD schema
Adding DomainDN: DC=pkg,DC=test,DC=com
Adding configuration container
Setting up sam.ldb schema
Setting up sam.ldb configuration data
Setting up display specifiers
Modifying display specifiers
Adding users container
Modifying users container
Adding computers container
Modifying computers container
Setting up sam.ldb data
Setting up well known security principals
Setting up sam.ldb users and groups
Setting up self join
Adding DNS accounts
Creating CN=MicrosoftDNS,CN=System,DC=pkg,DC=test,DC=com
Creating DomainDnsZones and ForestDnsZones partitions
Populating DomainDnsZones and ForestDnsZones partitions
Setting up sam.ldb rootDSE marking as synchronized
Fixing provision GUIDs
```


In my jail, the following were installed:

```
ca_root_nss-3.22.2            Root certificate bundle from the Mozilla Project
cyrus-sasl-2.1.26_12          RFC 2222 SASL (Simple Authentication and Security Layer)
expat-2.1.0_3  XML 1.0       parser written in C
gamin-0.1.10_8                  File and directory monitoring system
gettext-runtime-0.19.7       GNU gettext runtime libraries and programs
glib-2.46.2                          Some useful routines of C programming (current stable version)
gmp-5.1.3_3                      Free library for arbitrary precision arithmetic
gnutls-3.4.10                     GNU Transport Layer Security library
indexinfo-0.2.4                   Utility to regenerate the GNU info page index
ldb-1.1.26                          LDAP-like embedded database
libarchive-3.2.0,1               Library to create and read several streaming archive formats
libffi-3.2.1                          Foreign Function Interface
libgcrypt-1.6.5_1               General purpose crypto library based on code used in GnuPG
libgpg-error-1.21                Common error values for all GnuPG components
libiconv-1.14_9                  Character set conversion library
libidn-1.31                          Internationalized Domain Names command line tool
libinotify-20150910            Kevent based inotify compatible library
libsunacl-1.0                      Wrapper providing SunOS NFSv4 ACL API
libtasn1-4.8                      ASN.1 structure parser library
lzo2-2.09                         Portable speedy, lossless data compression library
nettle-3.2                          Low-level cryptographic library
openldap-client-2.4.44       Open source LDAP client implementation
p11-kit-0.23.2                  Library for loading and enumerating of PKCS#11 modules
pcre-8.38_1                      Perl Compatible Regular Expressions library
perl5-5.20.3_12                Practical Extraction and Report Language
pkg-1.7.2                          Package manager
popt-1.16_1                     Getopt(3) like library with a number of enhancements, from Redhat
py27-dnspython-1.12.0     DNS toolkit for Python
py27-setuptools27-20.0    Python packages installer
python2-2_3                      The "meta-port" for version 2 of the Python interpreter
python27-2.7.11_2             Interpreted object-oriented programming language
samba43-4.3.8                 Free SMB/CIFS and AD/DC server and client for Unix
talloc-2.1.6                        Hierarchical pool based memory allocator
tdb-1.3.9,1                          Trivial Database
tevent-0.9.28                     Talloc based event loop library
trousers-tddl-0.3.10_7        The open-source TCG Software Stack
```

Searching the internet I read something about talloc 2.1.6 causing some problems. I believe this has been reported in https://bugzilla.samba.org/
My question is as follows: Can anyone tell me if a solution has been found? If so, could you please point me on the right direction to fix this issue.

Thanks!


----------



## SirDice (May 24, 2016)

PR 208767

https://svnweb.freebsd.org/ports?view=revision&revision=413713


----------



## ayudante (May 24, 2016)

Thank you SirDice for the link provided. I will apply the patches


----------



## SirDice (May 25, 2016)

Don't. Just update your ports tree. It's already fixed in the port.


----------



## ayudante (May 31, 2016)

Good to know, I will do a `portsnap fetch update` and then install from ports. Thanks


----------

