Comment 5 for bug 1583324

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

As a workaround, if you replace the indicated line in /etc/init.d/samba-ad-dc, does it work?
--- /etc/init.d/samba-ad-dc.orig 2018-07-20 13:33:22.418002978 +0000
+++ /etc/init.d/samba-ad-dc 2018-07-20 13:33:34.966042631 +0000
@@ -27,7 +27,7 @@

 case "$1" in
  start)
- SERVER_ROLE=`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1`
+ SERVER_ROLE=`testparm -s --parameter-name="server role" 2>/dev/null | tail -1`
   if [ "$SERVER_ROLE" != "active directory domain controller" ]; then
       exit 0
   fi

i.e., replace "samba-tool testparm" with "testparm -s", and then issue

sudo systemctl daemon-reload

But I suspect you added the %U include directive after provisioning the domain, as the provision tool complains about it if you start off with such a smb.conf, so this needs a better fix.