On 2023-03-28 15:41, Luis Peromarta via samba wrote:
> In Debian try:
>
> rm /run/samba/*.tdb \
> /run/samba/*.ldb \
> /var/lib/samba/*.tdb \
> /var/lib/samba/*.ldb \
> /var/cache/samba/*.tdb \
> /var/cache/samba/*.ldb \
> /var/lib/samba/private/*.tdb \
> /var/lib/samba/private/*.ldb
>
>
> Regards.
>
> LP
Still getting an error when trying to install samba - it starts when
configuring samba-common-bin. As you can see, it seems to want smb.conf
but that doesn't exist until I run samba-tool... Even after removing the
files you suggested, I'm still getting samba-tool picking up the
provisioning defaults from my previous values.
Setting up samba-common-bin (2:4.13.13+dfsg-1~deb11u5) ...
Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Error loading services.
dpkg: error processing package samba-common-bin (--configure):
?installed samba-common-bin package post-installation script subprocess
returned error exit status 1
dpkg: dependency problems prevent configuration of samba:
?samba depends on samba-common-bin (= 2:4.13.13+dfsg-1~deb11u5); however:
? Package samba-common-bin is not configured yet.
dpkg: error processing package samba (--configure):
?dependency problems - leaving unconfigured
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+deb11u5) ...
Errors were encountered while processing:
?samba-common-bin
?samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
Samba-tool returns this:
samba-tool domain provision --use-rfc2307 --interactive
Realm [RAHIM-DALE.ORG,]:
Domain [RAHIM-DALE]:
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.1.14]:
Administrator password:
Retype password:
INFO 2023-03-28 16:16:39,375 pid:4139
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2122:
Looking up IPv4 addresses
INFO 2023-03-28 16:16:39,376 pid:4139
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2139:
Looking up IPv6 addresses
WARNING 2023-03-28 16:16:39,376 pid:4139
/usr/lib/python3/dist-packages/samba/provision/__init__.py #2146: No
IPv6 address will be assigned
Error: Unable to parse dn
'CN=Schema,CN=Configuration,DC=rahim-dale,DC=org,'
ERROR(runtime): uncaught exception - (87, 'WERR_INVALID_PARAMETER')
? 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 147, in
__init__
??? self.set_from_ldif(prefixmap_ldif, self.schema_data, self.schemadn)
? File "/usr/lib/python3/dist-packages/samba/schema.py", line 160, in
set_from_ldif
??? dsdb._dsdb_set_schema_from_ldif(self.ldb, pf, df, dn)
After I do that, I can configure samba-common-bin but when I configure
samba I get this:
?dpkg --configure samba
Setting up samba (2:4.13.13+dfsg-1~deb11u5) ...
Samba is being run as an AD Domain Controller: Masking smbd.service
nmbd.service
Please ignore the following error about deb-systemd-helper not finding
those services.
(smbd.service already masked)
(nmbd.service already masked)
insserv: script rpcbind: service portmap already provided!
insserv: script rpcbind: service portmap already provided!
insserv: script rpcbind: service portmap already provided!
Failed to preset unit: Unit file /etc/systemd/system/nmbd.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on
nmbd.service: No such file or directory
Created symlink
/etc/systemd/system/multi-user.target.wants/samba-ad-dc.service ?
/lib/systemd/system/samba-ad-dc.service.
Failed to preset unit: Unit file /etc/systemd/system/smbd.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on
smbd.service: No such file or directory
nmbd.service is a disabled or a static unit, not starting it.
smbd.service is a disabled or a static unit, not starting it.
Job for samba-ad-dc.service failed because the control process exited
with error code.
See "systemctl status samba-ad-dc.service" and "journalctl
-xe" for details.
Processing triggers for libc-bin (2.31-13+deb11u5) ...
The log.samba shows:
[2023/03/28 16:18:25.097187,? 0]
../../source4/smbd/server.c:644(binary_smbd_main)
? samba version 4.13.13-Debian started.
? Copyright Andrew Tridgell and the Samba Team 1992-2020
[2023/03/28 16:18:25.097747,? 0]
../../lib/util/become_daemon.c:147(daemon_status)
? daemon_status: daemon 'samba' : Starting process...
[2023/03/28 16:18:25.142279,? 0]
../../lib/util/become_daemon.c:121(exit_daemon)
? exit_daemon: daemon failed to start: Samba failed to prime database,
error code 22