From owner-freebsd-questions@freebsd.org Fri May 22 01:11:53 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4EFD22FA592 for ; Fri, 22 May 2020 01:11:53 +0000 (UTC) (envelope-from dweimer@dweimer.net) Received: from webmail.dweimer.net (024-240-198-186.biz.spectrum.com [24.240.198.186]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "dweimer.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49SpNm3ktpz4Zbk for ; Fri, 22 May 2020 01:11:52 +0000 (UTC) (envelope-from dweimer@dweimer.net) Received-SPF: pass (webmail.dweimer.net: authenticated connection) receiver=webmail.dweimer.net; client-ip=10.9.5.1; helo=www.dweimer.net; envelope-from=dweimer@dweimer.net; x-software=spfmilter 2.001 http://www.acme.com/software/spfmilter/ with libspf2-1.2.10; Received: from www.dweimer.net (pfsense.dweimer.me [10.9.5.1]) (authenticated bits=0) by webmail.dweimer.net (8.15.2/8.15.2) with ESMTPSA id 04M1BiEa098515 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 21 May 2020 20:11:44 -0500 (CDT) (envelope-from dweimer@dweimer.net) MIME-Version: 1.0 Date: Thu, 21 May 2020 20:11:39 -0500 From: "Dean E. Weimer" To: byrnejb@harte-lyne.ca Cc: Andrea Venturoli , freebsd-questions@freebsd.org Subject: Re: FreeBSD as an Active Directory Domain Controller Reply-To: dweimer@dweimer.net In-Reply-To: <1d6dd578eadaf13def02280d06f37ffe.squirrel@webmail.harte-lyne.ca> References: <1d6dd578eadaf13def02280d06f37ffe.squirrel@webmail.harte-lyne.ca> User-Agent: Roundcube Webmail/1.4.4 Message-ID: <67e6f02205a0f4e87de826c61ef75f6d@dweimer.net> X-Sender: dweimer@dweimer.net Organization: dweimer.net Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49SpNm3ktpz4Zbk X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.11 / 15.00]; HAS_REPLYTO(0.00)[dweimer@dweimer.net]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[dweimer.net:s=2017.01.31]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:24.240.198.184/29]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; ARC_NA(0.00)[]; HAS_ORG_HEADER(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[dweimer.net:+]; DMARC_POLICY_ALLOW(-0.50)[dweimer.net,reject]; NEURAL_HAM_SHORT(-0.08)[-0.080]; NEURAL_HAM_MEDIUM(-1.03)[-1.030]; NEURAL_HAM_LONG(-1.00)[-0.999]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:20115, ipnet:24.240.196.0/22, country:US]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2020 01:11:53 -0000 On 2020-05-21 2:31 pm, James B. Byrne via freebsd-questions wrote: > On Wed, May 20, 2020 13:16, Andrea Venturoli wrote: >> On 2020-05-20 19:09, James B. Byrne via freebsd-questions wrote: >> >>> What I would like to find out is whether it is at all possible to >>> have a >>> samba-4.10 (or 4.11) based AD on FreeBSD using ZFS with multiple DCs >>> and >>> replication. Is someone has this working I would appreciate being >>> told how it >>> is done. >> >> Hi James. >> Sounds like the same question you asked ten days ago, which I already >> answered briefly (I use rsync). >> >> Perhaps you could tell what you tried, how you did it and how it is >> going wrong? >> > > I have a DC that was setup on FreeBSD-10.3 using samba-4.3 and UFS. At > the > time samba on FreeBSD could only be set up on ufs. Samba-4.4 and later > removed > support for nt style acls, that samba on FreeBSD required. Samba43 > disappeared > with the update to 10.4 and Samba-4.4 did not work, so that system > could not be > updated. > > Fast forward to now. Samba410-4.10.15 on FreeBSD-12.1p5 and using ZFS > now can > be provisioned as a DC so acls obviously must be working on ZFS, I > created a > Samab410 instance, checked that it could provision, undid that work and > reinstalled samba and used samba-tool to join the existing domain. I > then > attempted to replicate the sysvol using rsync. However, I get acl > error > messages when I do that and the resulting permissions do not resemble > what I > see on the DC. > > rsync -XAavz --delete-after --rsh='ssh' > [192.168.8.65]:/var/db/samba4/sysvol > /var/db/samba4 > receiving file list ... done > > rsync: set_acl: sys_acl_set_file(sysvol, ACL_TYPE_ACCESS): Invalid > argument (22) > > rsync: set_acl: sys_acl_set_file(sysvol/brockley-2016.harte-lyne.ca, > ACL_TYPE_ACCESS): Invalid argument (22) > > rsync: set_acl: > sys_acl_set_file(sysvol/brockley-2016.harte-lyne.ca/Policies, > ACL_TYPE_ACCESS): Invalid argument (22) > > > > I have gone down different routes to get around this block but I keep > being > stymied by one incompatibility or another, to the point where today I > installed > Debian on a BHyve vm to see id rsync behaves any differently on it than > on > FreeBSD. > > What I am looking for some guidance as to what is supposed to work and > has been > observed to work by someone running a multi DC environment of FreeBSD > and zfs. > I presume that if I can provision a new domain on samba41 then I can > likewise > set the acls using rsat. However, if one can only have one DC in that > configuration because replication via rsync does not work on FreeBSD > then that > is no better than what I have now. > > -- > *** e-Mail is NOT a SECURE channel *** > Do NOT transmit sensitive data via e-Mail > Do NOT open attachments nor follow links sent by e-Mail > > James B. Byrne mailto:ByrneJB@Harte-Lyne.ca > Harte & Lyne Limited http://www.harte-lyne.ca > 9 Brockley Drive vox: +1 905 561 1241 > Hamilton, Ontario fax: +1 905 561 0757 > Canada L8E 3C3 > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" Did you make sure to set your zfs data set aclmode and and aclinherit options to passthrough? I am running Samba 4.11.8 on two FreeBSD 12.1p5 systems I did the initial install on 12.1 not sure which patch at the time with Samba 4.10 and then switched to 4.11. Though this was setup as a test system and only has a few accounts on it. Syncing at 5 minute intervals with rsync -XAavq --delete-after -e "ssh" --progress root@samba1.dweimer.me:/var/db/samba4/sysvol/ /var/db/samba4/sysvol Its not returning any errors, but then again there is not a lot of changes occurring. -- Thanks, Dean E. Weimer http://www.dweimer.net/