Bug 239105 - net/samba410: samba-tool domain provision --use-rfc2307 --interactive not working
Summary: net/samba410: samba-tool domain provision --use-rfc2307 --interactive not wor...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Timur I. Bakeyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-10 09:20 UTC by rogn4r
Modified: 2019-10-21 17:35 UTC (History)
15 users (show)

See Also:
bugzilla: maintainer-feedback? (timur)


Attachments
plist-fix to install missing modules (1.73 KB, patch)
2019-07-10 21:45 UTC, Pawel Worach
no flags Details | Diff
Make ZEROCONF optional: SINGLE replaced on RADIO (591 bytes, patch)
2019-08-22 23:23 UTC, VVD
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rogn4r 2019-07-10 09:20:29 UTC
it just stuck but did not throw any error
Comment 1 rogn4r 2019-07-10 09:59:11 UTC
and i try non interactive 

WARNING: Module [group_audit_log] not found - do you need to set LDB_MODULES_PATH?
module samba_dsdb initialization failed : Operations error
Unable to load modules for /var/db/samba4/private/sam.ldb: No such Base DN: @INDEXLIST
ERROR(ldb): uncaught exception - No such Base DN: @INDEXLIST
Comment 2 Pawel Worach 2019-07-10 21:45:20 UTC
Created attachment 205675 [details]
plist-fix to install missing modules

Proposed patch, not sure about the options that control if mdb.so is built, the two audit modules are only built for AD_DC.
Comment 3 Chris Rees freebsd_committer 2019-07-14 09:48:18 UTC
This has hit me too.

Pawel's patch is correct, but of course needs a PORTREVISION bump too.
Comment 4 rogn4r 2019-07-14 10:18:44 UTC
Pawel patch works fine, thank you
Comment 5 basil 2019-07-23 19:16:53 UTC
samba-tool domain provision --domain=TEST --use-rfc2307 --realm=test.home --adminpass=1Passw@rD


Whithout patch >

INFO 2019-07-24 00:36:41,587 pid:2459 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1297: Pre-loading the Samba 4 and AD schema
WARNING: Module [group_audit_log] not found - do you need to set LDB_MODULES_PATH?
module samba_dsdb initialization failed : Operations error
Unable to load modules for /var/db/samba4/private/sam.ldb: No such Base DN: @INDEXLIST
ERROR(ldb): uncaught exception - No such Base DN: @INDEXLIST



Whith patch >
INFO 2019-07-24 01:15:59,293 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2087: Looking up IPv4 addresses
WARNING 2019-07-24 01:15:59,294 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2093: More than one IPv4 address found. Using 192.168.56.25
INFO 2019-07-24 01:15:59,294 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2104: Looking up IPv6 addresses
WARNING 2019-07-24 01:15:59,294 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2111: No IPv6 address will be assigned
INFO 2019-07-24 01:15:59,544 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2277: Setting up share.ldb
INFO 2019-07-24 01:15:59,556 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2281: Setting up secrets.ldb
INFO 2019-07-24 01:15:59,565 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2287: Setting up the registry
INFO 2019-07-24 01:15:59,591 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2290: Setting up the privileges database
INFO 2019-07-24 01:15:59,605 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2293: Setting up idmap db
INFO 2019-07-24 01:15:59,616 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2300: Setting up SAM db
INFO 2019-07-24 01:15:59,622 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #882: Setting up sam.ldb partitions and settings
INFO 2019-07-24 01:15:59,622 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #894: Setting up sam.ldb rootDSE
INFO 2019-07-24 01:15:59,624 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1297: Pre-loading the Samba 4 and AD schema
Unable to determine the DomainSID, can not enforce uniqueness constraint on local domainSIDs

INFO 2019-07-24 01:15:59,639 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1374: Adding DomainDN: DC=test,DC=home
INFO 2019-07-24 01:15:59,648 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1406: Adding configuration container
INFO 2019-07-24 01:15:59,659 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1415: Setting up sam.ldb schema
INFO 2019-07-24 01:16:00,896 pid:52505 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1435: Setting up sam.ldb configuration data
ERROR(<class 'UnicodeDecodeError'>): uncaught exception - 'ascii' codec can't decode byte 0xe2 in position 513: ordinal not in range(128)
  File "/usr/local/lib/python3.6/site-packages/samba/netcmd/__init__.py", line 185, in _run
    return self.run(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/samba/netcmd/domain.py", line 536, in run
    backend_store=backend_store)
  File "/usr/local/lib/python3.6/site-packages/samba/provision/__init__.py", line 2342, in provision
    backend_store=backend_store)
  File "/usr/local/lib/python3.6/site-packages/samba/provision/__init__.py", line 1924, in provision_fill
    backend_store=backend_store)
  File "/usr/local/lib/python3.6/site-packages/samba/provision/__init__.py", line 1473, in fill_samdb
    "INC2012": incl_2012,
  File "/usr/local/lib/python3.6/site-packages/samba/provision/common.py", line 54, in setup_add_ldif
    data = read_and_sub_file(ldif_path, subst_vars)
  File "/usr/local/lib/python3.6/site-packages/samba/__init__.py", line 283, in read_and_sub_file
    data = open(file_name, 'r').read()
  File "/usr/local/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
Comment 7 basil 2019-07-26 05:11:28 UTC
Hi

Th you for help. Now i have other error
ERROR(runtime): uncaught exception - (3221225485, 'An invalid parameter was passed to a service or function.')


P.S. net/samba48 has same problems with samba-tool, but samba-tool from net/samba47 worked fine...



root@vb-freebsd:~ # samba-tool domain provision --domain=OFFICE --use-rfc2307 --realm=office.test --adminpass=Passw@orD
INFO 2019-07-26 11:06:32,636 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2087: Looking up IPv4 addresses
WARNING 2019-07-26 11:06:32,636 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2093: More than one IPv4 address found. Using 192.168.56.25
INFO 2019-07-26 11:06:32,636 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2104: Looking up IPv6 addresses
WARNING 2019-07-26 11:06:32,637 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2111: No IPv6 address will be assigned
INFO 2019-07-26 11:06:32,912 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2277: Setting up share.ldb
INFO 2019-07-26 11:06:32,925 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2281: Setting up secrets.ldb
INFO 2019-07-26 11:06:32,936 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2287: Setting up the registry
INFO 2019-07-26 11:06:32,959 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2290: Setting up the privileges database
INFO 2019-07-26 11:06:32,971 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2293: Setting up idmap db
INFO 2019-07-26 11:06:32,982 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2300: Setting up SAM db
INFO 2019-07-26 11:06:32,987 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #882: Setting up sam.ldb partitions and settings
INFO 2019-07-26 11:06:32,988 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #894: Setting up sam.ldb rootDSE
INFO 2019-07-26 11:06:32,990 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1297: Pre-loading the Samba 4 and AD schema
Unable to determine the DomainSID, can not enforce uniqueness constraint on local domainSIDs

INFO 2019-07-26 11:06:33,009 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1374: Adding DomainDN: DC=office,DC=test
INFO 2019-07-26 11:06:33,019 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1406: Adding configuration container
INFO 2019-07-26 11:06:33,029 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1415: Setting up sam.ldb schema
INFO 2019-07-26 11:06:34,241 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1435: Setting up sam.ldb configuration data
INFO 2019-07-26 11:06:34,334 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1476: Setting up display specifiers
INFO 2019-07-26 11:06:35,232 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1484: Modifying display specifiers and extended rights
INFO 2019-07-26 11:06:35,254 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1491: Adding users container
INFO 2019-07-26 11:06:35,255 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1497: Modifying users container
INFO 2019-07-26 11:06:35,256 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1500: Adding computers container
INFO 2019-07-26 11:06:35,257 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1506: Modifying computers container
INFO 2019-07-26 11:06:35,258 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1510: Setting up sam.ldb data
INFO 2019-07-26 11:06:35,347 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1540: Setting up well known security principals
INFO 2019-07-26 11:06:35,366 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1554: Setting up sam.ldb users and groups
INFO 2019-07-26 11:06:35,457 pid:786 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #1562: Setting up self join
set_nt_acl_no_snum: fset_nt_acl returned NT_STATUS_INVALID_PARAMETER.
ERROR(runtime): uncaught exception - (3221225485, 'An invalid parameter was passed to a service or function.')
  File "/usr/local/lib/python3.6/site-packages/samba/netcmd/__init__.py", line 185, in _run
    return self.run(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/samba/netcmd/domain.py", line 536, in run
    backend_store=backend_store)
  File "/usr/local/lib/python3.6/site-packages/samba/provision/__init__.py", line 2342, in provision
    backend_store=backend_store)
  File "/usr/local/lib/python3.6/site-packages/samba/provision/__init__.py", line 1946, in provision_fill
    names.domaindn, lp, use_ntvfs)
  File "/usr/local/lib/python3.6/site-packages/samba/provision/__init__.py", line 1726, in setsysvolacl
    _setntacl(sysvol)
  File "/usr/local/lib/python3.6/site-packages/samba/provision/__init__.py", line 1723, in _setntacl
    service=SYSVOL_SERVICE, session_info=session_info)
  File "/usr/local/lib/python3.6/site-packages/samba/ntacls.py", line 230, in setntacl
    service=service, session_info=session_info)
Comment 8 VVD 2019-07-29 23:57:44 UTC
>    * BUG 13828: samba-tool domain provision: Fix --interactive module in
>     python3.
https://www.samba.org/samba/history/samba-4.10.6.html
Comment 9 Andrej Ebert 2019-08-05 12:13:45 UTC
This also hit me on an upgrade of a domain controller from 4.6 to 4.10, the server wouldn't start:
[2019/08/05 13:22:00.865649,  0, effective(0, 0), real(0, 0)] ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
  ldb: WARNING: Module [group_audit_log] not found - do you need to set LDB_MODULES_PATH?
[2019/08/05 13:22:00.865741,  0, effective(0, 0), real(0, 0)] ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
  ldb: module samba_dsdb initialization failed : Operations error
[2019/08/05 13:22:00.865787,  0, effective(0, 0), real(0, 0)] ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
  ldb: Unable to load modules for /var/db/samba4/private/sam.ldb: (null)
[2019/08/05 13:22:00.867065,  0, effective(0, 0), real(0, 0)] ../../lib/util/become_daemon.c:122(exit_daemon)
  exit_daemon: daemon failed to start: Samba failed to prime database, error code 22

After copying the 3 modules from the diff to /usr/local/lib/samba4/modules/ldb it works as expected, a recompile and reinstall after applying the diff didn't work for some reason (modules still weren't there).
Comment 10 commit-hook freebsd_committer 2019-08-19 22:23:11 UTC
A commit references this bug:

Author: timur
Date: Mon Aug 19 22:22:35 UTC 2019
New revision: 509383
URL: https://svnweb.freebsd.org/changeset/ports/509383

Log:
  Upgrade samba410 port to 4.10.6 version. Fixed vfs_freebsd to match newer
  configure test. This release should fix provisioning on UFS2 systems, ZFS
  provisioning is still broken...

  PR:		239105

Changes:
  head/net/samba410/Makefile
  head/net/samba410/distinfo
  head/net/samba410/files/man/ldb.3
  head/net/samba410/files/patch-lib_ldb_wscript
  head/net/samba410/files/patch-lib_tdb_wscript
  head/net/samba410/files/patch-listen-backlog
  head/net/samba410/files/patch-vfs_freebsd
  head/net/samba410/pkg-plist
Comment 11 VVD 2019-08-20 00:00:00 UTC
Thanks!
Add, plz, NONE to ZEROCONF section.
This line mandatory ask me to use one: "OPTIONS_SINGLE= GSSAPI ZEROCONF".
Comment 12 VVD 2019-08-20 00:05:48 UTC
Or this way:

--- Makefile.orig
+++ Makefile
@@ -98,9 +98,9 @@
 OPTIONS_SINGLE=                        GSSAPI ZEROCONF
 # GSSAPI_HEIMDAL
 OPTIONS_SINGLE_GSSAPI=         GSSAPI_BUILTIN GSSAPI_MIT
-OPTIONS_SINGLE_ZEROCONF=       AVAHI MDNSRESPONDER

-OPTIONS_RADIO=                 DNS
+OPTIONS_RADIO=                 ZEROCONF DNS
+OPTIONS_RADIO_ZEROCONF=                AVAHI MDNSRESPONDER
 OPTIONS_RADIO_DNS=             NSUPDATE BIND911 BIND914
 ##############################################################################
 AD_DC_DESC=                    Active Directory Domain Controller
Comment 13 andriys 2019-08-20 02:27:57 UTC
Also a related problem- databases/Makefile is missing ldb15 entry.
Comment 14 VVD 2019-08-20 11:20:02 UTC
Weird - on amd64 12.0 and 11.3 build fine with my patch, but on i386 12.0 I got error:

===>  Installing for samba410-4.10.6
===>  Checking if samba410 is already installed
===>   Registering installation for samba410-4.10.6
pkg-static: Unable to access file /usr/obj/usr/ports/net/samba410/work/stage/usr/local/lib/samba4/modules/ldb/mdb.so:No such file or directory
*** Error code 74

Stop.
make[1]: stopped in /usr/ports/net/samba410
*** Error code 1

# find /usr/obj/usr/ports/net/samba410/work/ -name mdb.so
# grep -R /mdb.so /usr/ports/net/samba410
/usr/ports/net/samba410/pkg-plist:%%AD_DC%%%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_MODULEDIR%%/ldb/mdb.so
Comment 15 Felix Palmen 2019-08-20 19:26:59 UTC
Just a quick note: this hit me when upgrading samba from 48 to 410 on a machine that was provisioned as ADDC with samba47. The patch attached here resolved the issue, so thanks for that! Please resolve remaining issues and commit this soon :)

BR, Felix
Comment 16 VVD 2019-08-20 19:33:37 UTC
(In reply to Felix Palmen from comment #15)
What patch?
Comment 17 Felix Palmen 2019-08-20 20:37:04 UTC
(In reply to VVD from comment #16)
The one attached here. I'm on amd64...
Comment 18 VVD 2019-08-20 21:20:16 UTC
(In reply to Felix Palmen from comment #17)
This: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=205675&action=diff ?
It's applied already - check net/samba410/pkg-plist file.
Comment 19 Matthias Petermann 2019-08-21 09:04:34 UTC
Thanks for solving this issue. Can this be pulled up to 2019Q3 branch?
Comment 20 Vincent Bentley 2019-08-21 09:47:42 UTC
(In reply to VVD from comment #14)
I haven't applied any patches, but I got the same error today with Poudriere trying to build on i386 12.0-RELEASE-p8

=======================<phase: package        >============================
===>  Building package for samba410-4.10.6
pkg-static: Unable to access file /wrkdirs/usr/ports/net/samba410/work/stage/usr/local/lib/samba4/modules/ldb/mdb.so:No such file or directory
*** Error code 1
Comment 21 doctor 2019-08-22 20:11:26 UTC
samba 4.10.7 is out .  What not move up that way and see if the problems go away.
Comment 22 VVD 2019-08-22 23:23:50 UTC
Created attachment 206805 [details]
Make ZEROCONF optional: SINGLE replaced on RADIO

Build error on i386 gone after patch: https://svnweb.freebsd.org/ports?view=revision&revision=509598

But still can't build samba410 without ZEROCONF on any platform - patch attached.
Comment 23 doctor 2019-08-23 14:07:28 UTC
Just updated and now I get 

Traceback (most recent call last):
  File "/usr/local/bin/samba-tool", line 33, in <module>
    from samba.netcmd.main import cmd_sambatool
  File "/usr/local/lib/python3.6/site-packages/samba/__init__.py", line 28, in <module>
    import ldb
ImportError: /usr/local/lib/python3.6/site-packages/ldb.so: Undefined symbol "ldb_handler_copy"
Comment 24 andriys 2019-08-23 14:22:49 UTC
Undefined symbol error happens because ldb is now "builtin" by default. I have reported a similar issue (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239480) for the net/samba48 port almost a month ago.
Comment 25 doctor 2019-08-23 14:44:59 UTC
(In reply to doctor from comment #23)
may I suggest that databases/ldb15 be a dependency on net/samba410 ?
Comment 26 doctor 2019-08-23 23:42:24 UTC
Also I am trying to follow https://www.youtube.com/watch?v=riWQ1WZi5BM which seems to work for 10.1 but since some changes have been made , python failures are showing up.  Is their any way to treat this as thought it needed to be fixed yesterday?
Comment 27 tlb 2019-09-08 05:05:07 UTC
Still broken:

--- snip ---

[root@dc ~]# samba-tool domain provision --use-rfc2307 --interactive
Realm [XXX.NET]:
Domain [XXX]:  XXX
Server Role (dc, member, standalone) [dc]:  dc
DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]:  BIND9_DLZ
Administrator password:
Retype password:
INFO 2019-09-07 20:58:55,561 pid:37356 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2096: Looking up IPv4 addresses
INFO 2019-09-07 20:58:55,562 pid:37356 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2113: Looking up IPv6 addresses
WARNING 2019-09-07 20:58:55,562 pid:37356 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2120: No IPv6 address will be assigned
INFO 2019-09-07 20:58:56,284 pid:37356 /usr/local/lib/python3.6/site-packages/samba/provision/__init__.py #2286: Setting up share.ldb
Unable to find backend for '/var/db/samba4/private/share.ldb' - do you need to set LDB_MODULES_PATH?
ERROR(ldb): uncaught exception - None
  File "/usr/local/lib/python3.6/site-packages/samba/netcmd/__init__.py", line 185, in _run
    return self.run(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/samba/netcmd/domain.py", line 537, in run
    backend_store=backend_store)
  File "/usr/local/lib/python3.6/site-packages/samba/provision/__init__.py", line 2287, in provision
    share_ldb = Ldb(paths.shareconf, session_info=session_info, lp=lp)
  File "/usr/local/lib/python3.6/site-packages/samba/__init__.py", line 115, in __init__
    self.connect(url, flags, options)
[root@dc ~]#
--- snip ---

Also, I imagine this should probably be marked as affecting more than "only me", since I imagine a lot of people would like to use the Samba AD DC functionality.
Comment 28 Phillip R. Jaenke 2019-09-14 21:55:32 UTC
Please fix the importance to 'affects everyone.' This has clearly been broken for months, and quite obviously breaks core functionality. A fix for what should be a simple problem is needed ASAP.
Comment 29 Vithushan Ka. 2019-09-14 23:31:22 UTC
(In reply to tlb from comment #27)

add this to your make.conf

SAMBA4_BUNDLED_TALLOC=          no
SAMBA4_BUNDLED_TEVENT=          no
SAMBA4_BUNDLED_TDB=             no
SAMBA4_BUNDLED_LDB=             no

that work for me
Comment 30 Phillip R. Jaenke 2019-09-15 02:40:32 UTC
(In reply to Vithushan Ka. from comment #29)

No, your claimed fix does not fix anything. This breaks LMDB linking which results in a build that CANNOT be used as a domain controller. AD_DC requires both LDB and LMDB. This is what you get with 'SAMBA4_BUNDLED_LDB=no'

Makefile:
474 # LMDB
475 SAMBA4_LMDB_DEPENDS=        lmdb>=0.9.16:databases/lmdb
476 PLIST_FILES+=           lib/samba4/private/libldb-mdb-int-samba4.so \
477                 ${SAMBA4_MODULEDIR}/ldb/mdb.so

# pkg info -l samba410 | grep lmdb
#
# pkg info -l samba410 | grep libldb-mdb
#
# ls -l /usr/local/lib/samba4/private/libldb-mdb-int-samba4.so
ls: /usr/local/lib/samba4/private/libldb-mdb-int-samba4.so: No such file or directory
# ls -l /usr/local/lib/samba4/modules
ls: /usr/local/lib/samba4/modules: No such file or directory
Comment 31 tlb 2019-09-19 19:33:56 UTC
I gather that we can look forward to more months of this port being utterly broken and that fact ignored, then?
Comment 32 Timur I. Bakeyev freebsd_committer 2019-09-19 22:29:21 UTC
(In reply to tlb from comment #31)

Feel free to send patches.
Comment 33 Vithushan Ka. 2019-09-20 15:38:45 UTC
(In reply to Phillip R. Jaenke from comment #30)


with the option I used I had to install ldb15 and it's good.  provision works, user creation works, and GPOs too.  in UFS it's ok but un ZFS is broken on the sysvol right, I think by putting the right the right nfsv4 manually the supply should work properly, it seems that Samba-tool is broken but not the smbd and the rest

PS: Sorry, I'm French sorry for my English, I was not a fan of my English teacher who did not love English ...
Comment 34 florian.heigl 2019-10-10 18:44:56 UTC
I'm not sure if I understand this in full (after just a day of trying), but:
it's my understanding that the problem resolves about the AD DC feature, when running on a ZFS system?

The start script currently tries to launch /usr/local/sbin/samba which is only created IF you have the AD DC option configured.

If this samba server is your AD DC, then right now you have a big problem.
But, as far as I know, the majority of samba servers are NOT AD DC's.

Is it possible to document the flags that would allow to only build the port for a file server - and make those the defaults.
That would mean in the pkg's we have on the repos there would be a samba that works on ZFS systems, except for one (not enabled) case. Instead right now we have a Samba that does not work for anyone at all (on ZFS, but that's pretty much a given), while also not making it work for the people that use it for DC. So, in fact, we seem to default to the worst possible case?

It gets complicated by the start script looking to start "samba" but that could be a problem in general since that tool is not built in all cases as far as I could see.

Sorry, if I am stepping on any toes here. But it seems a hard to solve problem and maybe it would be easier to reduce it's impact.
Comment 35 andriys 2019-10-11 10:55:18 UTC
(In reply to florian.heigl from comment #34)

You've got it wrong. This only concerns AD DC setups. File server setups work just fine- I have quite a few of them running samba410 from the official repo, all running on ZFS, some joined to AD and some standalone... I do not currently experience any problems with any of them.
Comment 36 Chris Rees freebsd_committer 2019-10-11 19:15:00 UTC
(In reply to Timur I. Bakeyev from comment #32)

Sorry, replying late here.

You rejected my last patch, because it went against portgmr's wishes.  Unfortunately I can't find the email you referenced, because I'd like to reply to make a few comments to them- do you know which list it was on or have a link?