[Samba] Unable to provision a new server

Rob Campbell robcampbell08105 at gmail.com
Sun Jan 16 17:43:21 UTC 2022


# apt install acl attr autoconf bison build-essential debhelper dnsutils
docbook-xml docbook-xsl flex gdb libjansson-dev krb5-user libacl1-dev
libaio-dev libarchive-dev libattr1-dev libblkid-dev libbsd-dev   libcap-dev
libcups2-dev libgnutls28-dev libgpgme-dev libjson-perl libldap2-dev
libncurses5-dev libpam0g-dev libparse-yapp-perl libpopt-dev libreadline-dev
nettle-dev perl perl-modules pkg-config python-all-dev python2-dbg
python-dev python3-dnspython python3-markdown python3-dev xsltproc
zlib1g-dev liblmdb-dev lmdb-utils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'perl-modules-5.32' instead of 'perl-modules'
Note, selecting 'python-dev-is-python2' instead of 'python-dev'
acl is already the newest version (2.2.53-10).
libacl1-dev is already the newest version (2.2.53-10).
attr is already the newest version (1:2.4.48-6).
libattr1-dev is already the newest version (1:2.4.48-6).
autoconf is already the newest version (2.69-14).
dnsutils is already the newest version (1:9.16.22-1~deb11u1).
bison is already the newest version (2:3.7.5+dfsg-1).
build-essential is already the newest version (12.9).
libcups2-dev is already the newest version (2.3.3op2-3+deb11u1).
debhelper is already the newest version (13.3.4).
python3-dnspython is already the newest version (2.0.0-1).
docbook-xml is already the newest version (4.5-9).
docbook-xsl is already the newest version (1.79.2+dfsg-1).
flex is already the newest version (2.6.4-8).
gdb is already the newest version (10.1-1.7).
libgnutls28-dev is already the newest version (3.7.1-5).
libgpgme-dev is already the newest version (1.14.0-1+b2).
libjansson-dev is already the newest version (2.13.1-1.1).
krb5-user is already the newest version (1.18.3-6+deb11u1).
libaio-dev is already the newest version (0.3.112-9).
libarchive-dev is already the newest version (3.4.3-2+b1).
libbsd-dev is already the newest version (0.11.3-1).
libcap-dev is already the newest version (1:2.44-1).
libjson-perl is already the newest version (4.03000-1).
libparse-yapp-perl is already the newest version (1.21-2).
xsltproc is already the newest version (1.1.34-4).
liblmdb-dev is already the newest version (0.9.24-1).
lmdb-utils is already the newest version (0.9.24-1).
libncurses5-dev is already the newest version (6.2+20201114-2).
nettle-dev is already the newest version (3.7.3-1).
libldap2-dev is already the newest version (2.4.57+dfsg-3).
libpam0g-dev is already the newest version (1.4.0-9+deb11u1).
perl is already the newest version (5.32.1-4+deb11u2).
perl-modules-5.32 is already the newest version (5.32.1-4+deb11u2).
pkg-config is already the newest version (0.29.2-1).
libpopt-dev is already the newest version (1.18-2).
python-all-dev is already the newest version (2.7.18-3).
python2-dbg is already the newest version (2.7.18-3).
python3-markdown is already the newest version (3.3.4-1).
python3-dev is already the newest version (3.9.2-3).
libreadline-dev is already the newest version (8.1-1).
libblkid-dev is already the newest version (2.36.1-8).
python-dev-is-python2 is already the newest version (2.7.18-9).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

# ./bootstrap.sh
+ export DEBIAN_FRONTEND=noninteractive
+ DEBIAN_FRONTEND=noninteractive
+ apt-get -y update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Get:2 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Get:3 http://security.debian.org/debian-security bullseye-security
InRelease [44.1 kB]
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease
Fetched 83.5 kB in 1s (136 kB/s)
Reading package lists... Done
+ apt-get -y install acl apt-utils attr autoconf bind9utils binutils bison
build-essential ccache chrpath curl debhelper dnsutils docbook-xml
docbook-xsl flex gcc gdb git glusterfs-common gzip heimdal-multidev
hostname htop krb5-config krb5-kdc krb5-user lcov libacl1-dev
libarchive-dev libattr1-dev libavahi-common-dev libblkid-dev libbsd-dev
libcap-dev libcephfs-dev libcups2-dev libdbus-1-dev libglib2.0-dev
libgnutls28-dev libgpgme11-dev libicu-dev libjansson-dev libjs-jquery
libjson-perl libkrb5-dev libldap2-dev liblmdb-dev libncurses5-dev
libpam0g-dev libparse-yapp-perl libpcap-dev libpopt-dev libreadline-dev
libsystemd-dev libtasn1-bin libtasn1-dev libtracker-sparql-2.0-dev
libunwind-dev liburing-dev lmdb-utils locales lsb-release make mawk
mingw-w64 patch perl perl-modules pkg-config procps psmisc python3
python3-cryptography python3-dbg python3-dev python3-dnspython python3-gpg
python3-iso8601 python3-markdown python3-matplotlib python3-pexpect
python3-pyasn1 python3-setproctitle rng-tools rsync sed sudo tar tree
uuid-dev wget xfslibs-dev xsltproc zlib1g-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libgpgme-dev' instead of 'libgpgme11-dev'
Note, selecting 'libtasn1-6-dev' instead of 'libtasn1-dev'
Note, selecting 'perl-modules-5.32' instead of 'perl-modules'
acl is already the newest version (2.2.53-10).
libacl1-dev is already the newest version (2.2.53-10).
apt-utils is already the newest version (2.2.4).
attr is already the newest version (1:2.4.48-6).
libattr1-dev is already the newest version (1:2.4.48-6).
autoconf is already the newest version (2.69-14).
libavahi-common-dev is already the newest version (0.8-5).
bind9utils is already the newest version (1:9.16.22-1~deb11u1).
dnsutils is already the newest version (1:9.16.22-1~deb11u1).
binutils is already the newest version (2.35.2-2).
bison is already the newest version (2:3.7.5+dfsg-1).
build-essential is already the newest version (12.9).
ccache is already the newest version (4.2-1).
libcephfs-dev is already the newest version (14.2.21-1).
chrpath is already the newest version (0.16-2+b1).
libcups2-dev is already the newest version (2.3.3op2-3+deb11u1).
curl is already the newest version (7.74.0-1.3+deb11u1).
libdbus-1-dev is already the newest version (1.12.20-2).
debhelper is already the newest version (13.3.4).
python3-dnspython is already the newest version (2.0.0-1).
docbook-xml is already the newest version (4.5-9).
docbook-xsl is already the newest version (1.79.2+dfsg-1).
flex is already the newest version (2.6.4-8).
gcc is already the newest version (4:10.2.1-1).
gdb is already the newest version (10.1-1.7).
git is already the newest version (1:2.30.2-1).
libglib2.0-dev is already the newest version (2.66.8-1).
locales is already the newest version (2.31-13+deb11u2).
glusterfs-common is already the newest version (9.2-1).
libgnutls28-dev is already the newest version (3.7.1-5).
libgpgme-dev is already the newest version (1.14.0-1+b2).
python3-gpg is already the newest version (1.14.0-1+b2).
gzip is already the newest version (1.10-4).
heimdal-multidev is already the newest version (7.7.0+dfsg-2).
hostname is already the newest version (3.23).
htop is already the newest version (3.0.5-7).
libicu-dev is already the newest version (67.1-7).
libjansson-dev is already the newest version (2.13.1-1.1).
krb5-config is already the newest version (2.6+nmu1).
krb5-kdc is already the newest version (1.18.3-6+deb11u1).
krb5-user is already the newest version (1.18.3-6+deb11u1).
libkrb5-dev is already the newest version (1.18.3-6+deb11u1).
lcov is already the newest version (1.14-2).
libarchive-dev is already the newest version (3.4.3-2+b1).
libbsd-dev is already the newest version (0.11.3-1).
libcap-dev is already the newest version (1:2.44-1).
libjson-perl is already the newest version (4.03000-1).
libparse-yapp-perl is already the newest version (1.21-2).
libpcap-dev is already the newest version (1.10.0-2).
libtasn1-6-dev is already the newest version (4.16.0-2).
libtasn1-bin is already the newest version (4.16.0-2).
libunwind-dev is already the newest version (1.3.2-2).
liburing-dev is already the newest version (0.7-3).
xsltproc is already the newest version (1.1.34-4).
liblmdb-dev is already the newest version (0.9.24-1).
lmdb-utils is already the newest version (0.9.24-1).
lsb-release is already the newest version (11.1.0).
make is already the newest version (4.3-4.1).
python3-matplotlib is already the newest version (3.3.4-1).
mawk is already the newest version (1.3.4.20200120-2).
mingw-w64 is already the newest version (8.0.0-1).
libncurses5-dev is already the newest version (6.2+20201114-2).
libjs-jquery is already the newest version (3.5.1+dfsg+~3.5.5-7).
libldap2-dev is already the newest version (2.4.57+dfsg-3).
libpam0g-dev is already the newest version (1.4.0-9+deb11u1).
patch is already the newest version (2.7.6-7).
perl is already the newest version (5.32.1-4+deb11u2).
perl-modules-5.32 is already the newest version (5.32.1-4+deb11u2).
python3-pexpect is already the newest version (4.8.0-2).
pkg-config is already the newest version (0.29.2-1).
libpopt-dev is already the newest version (1.18-2).
procps is already the newest version (2:3.3.17-5).
psmisc is already the newest version (23.4-2).
python3-pyasn1 is already the newest version (0.4.8-1).
python3-cryptography is already the newest version (3.3.2-1).
python3-iso8601 is already the newest version (0.1.13-1).
python3-markdown is already the newest version (3.3.4-1).
python3-setproctitle is already the newest version (1.2.1-1+b1).
python3 is already the newest version (3.9.2-3).
python3-dbg is already the newest version (3.9.2-3).
python3-dev is already the newest version (3.9.2-3).
libreadline-dev is already the newest version (8.1-1).
rng-tools is already the newest version (5migrate1).
rsync is already the newest version (3.2.3-4+deb11u1).
sed is already the newest version (4.7-1).
sudo is already the newest version (1.9.5p2-3).
libsystemd-dev is already the newest version (247.3-6).
tar is already the newest version (1.34+dfsg-1).
libtracker-sparql-2.0-dev is already the newest version (2.3.6-2).
tree is already the newest version (1.8.0-1+b1).
libblkid-dev is already the newest version (2.36.1-8).
uuid-dev is already the newest version (2.36.1-8).
wget is already the newest version (1.21-1+deb11u1).
xfslibs-dev is already the newest version (5.10.0-4).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ apt-get -y autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ apt-get -y autoclean
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
+ apt-get -y clean

# samba-tool domain provision --server-role=dc --use-rfc2307
--dns-backend=SAMBA_INTERNAL --realm=INTERNAL.TEST-SERVER.LAN
--domain=INTERNAL
INFO 2022-01-16 12:34:54,379 pid:69334
/usr/lib/python3/dist-packages/samba/netcmd/domain.py #426: Administrator
password will be set randomly!
INFO 2022-01-16 12:34:54,385 pid:69334
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2122: Looking
up IPv4 addresses
INFO 2022-01-16 12:34:54,386 pid:69334
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2139: Looking
up IPv6 addresses
WARNING 2022-01-16 12:34:54,386 pid:69334
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2146: No IPv6
address will be assigned
ERROR(<class 'FileNotFoundError'>): uncaught exception - [Errno 2] No such
file or directory:
'/usr/share/samba/setup/ad-schema/AD_DS_Attributes__Windows_Server_2012_R2.ldf'
  File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 186,
in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/samba/netcmd/domain.py", line 487,
in run
    result = provision(self.logger,
  File "/usr/lib/python3/dist-packages/samba/provision/__init__.py", line
2278, in provision
    schema = Schema(domainsid, invocationid=invocationid,
  File "/usr/lib/python3/dist-packages/samba/schema.py", line 109, in
__init__
    self.schema_data = read_ms_schema(
  File "/usr/lib/python3/dist-packages/samba/ms_schema.py", line 313, in
read_ms_schema
    attr_ldif = __parse_schema_file(attr_file, "attributeSchema")
  File "/usr/lib/python3/dist-packages/samba/ms_schema.py", line 299, in
__parse_schema_file
    with open(filename, "r", encoding='latin-1') as f:


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In all things, Be Intentional.


More information about the samba mailing list