[Samba] Managing samba ad dc with systemd

Rowland Penny rpenny at samba.org
Fri Apr 26 15:52:00 UTC 2019

On Fri, 26 Apr 2019 12:23:35 -0300
Igor Sousa <igorvolt at gmail.com> wrote:

> Hi,
> Rowland,
> I've complied samba use:
> ./configure --enable-debug --enable-selftest --with-systemd

For a production server, you only need './configure', the rest
(including --with-systemd) are not needed

> make
> make install
> I haven't done anything to install MIT Kerberos and I've followed
> wiki to install Samba with your default Kerberos. Then I believe that
> I use Heimdal Kerberos

Yes, you will be using Heimdal, I only asked because using MIT is
classed as experimental and it may have had something to do with your

> I've installed EPEL repository to install python3 and other
> dependencies such as python36-dns. I can run samba with samba -D
> command and by systemd with systemctl start samba-ad-dc command. I
> don't know how to stop samba with samba command and when I've tried
> to managing it from systemd the systemctl status samba-ad-dc and it
> has shown Active: failed and Status "smbd: ready to serve
> connections...".

This is strange, if Samba starts by 'samba -D' and runs correctly, then
systemd should be able to start & stop Samba.

> Louis,
> samba -b output:
> [root at king ~]# samba -b
> Samba version: 4.10.2
> Build environment:
> Paths:
>    BINDIR: /usr/local/samba/bin
>    SBINDIR: /usr/local/samba/sbin
>    CONFIGFILE: /usr/local/samba/etc/smb.conf
>    NCALRPCDIR: /usr/local/samba/var/run/ncalrpc
>    LOGFILEBASE: /usr/local/samba/var
>    LMHOSTSFILE: /usr/local/samba/etc/lmhosts
>    DATADIR: /usr/local/samba/share
>    MODULESDIR: /usr/local/samba/lib
>    LOCKDIR: /usr/local/samba/var/lock
>    STATEDIR: /usr/local/samba/var/locks
>    CACHEDIR: /usr/local/samba/var/cache
>    PIDDIR: /usr/local/samba/var/run
>    PRIVATE_DIR: /usr/local/samba/private
>    CODEPAGEDIR: /usr/local/samba/share/codepages
>    SETUPDIR: /usr/local/samba/share/setup
>    WINBINDD_SOCKET_DIR: /usr/local/samba/var/run/winbindd
>    NTP_SIGND_SOCKET_DIR: /usr/local/samba/var/lib/ntp_signd

Can you post the contents of /usr/local/samba/etc/smb.conf
Do you have a /usr/sbin/samba file ?
What is your PATH ?


More information about the samba mailing list