Samba don't start with "Samba is not configured as AD DC"

##If samba don’t start anymore with the following error messages:

(not on a memberserver [ucr get server/role] or with samba NT)

root@ucs-master:~# /etc/init.d/samba restart
Stopping Samba daemon: samba.
Samba is not configured as AD DC.

####OR

root@ucs-master:~# /etc/init.d/samba restart
Stopping Samba AD DC daemon: samba.
Stopping NetBIOS name server: nmbd.
Starting NetBIOS name server: nmbd.
smbd disabled by ucr var samba/autostart=no
Samba is not configured as AD DC.

you have to check the smb.conf in /etc/samba/
The following command can be used:

samba-tool testparm --parameter-name="server role"  2>/dev/null | tail -1

The expected output is:
active directory domain controller
If there is no output, something is misconfigured.

###Possible misconfigurations are:

  • shares with double spaces in their name
  • empty smb.conf
  • included files which do not exist on the filesystem

Please only use /etc/init.d/samba and not /etc/init.d/samba-ad-dc. Just restarting the ad-dc component may leave samba in a non-functional state, e.g. when it comes to DRS replication.

Mastodon