[Samba] Option configure

Achim Gottinger achim at ag-web.biz
Tue Jul 12 19:25:55 UTC 2016


Just backported 4.4.5 from debian sid to jessie. samba.service is masked 
there. If running as an fileserver the services are started via 
smbd.service,nmbd.service, winbind.service.
There is an samba-ad-dc script which is masked by default.
To get the ad-dc up and running with systemd one has to unmask 
samba-ad-dc.service and mask smbd.service,nmbd.service, winbind.service.

  This is the samba-ad-dc.service script:

[Unit]

Description=Samba AD Daemon

Documentation=man:samba(8) man:samba(7) man:smb.conf(5)

After=network.target

[Service]

Type=notify

NotifyAccess=all

PIDFile=/run/samba.pid

LimitNOFILE=16384

EnvironmentFile=-/etc/default/samba

ExecStart=/usr/sbin/samba $SAMBAOPTIONS

ExecReload=/bin/kill -HUP $MAINPID

[Install]

WantedBy=multi-user.target


Am 12.07.2016 um 20:53 schrieb Sonic:
> On Tue, Jul 12, 2016 at 10:09 AM, Sonic <sonicsmith at gmail.com> wrote:
>> Mine use Type=forking, I had some issues with Type=notify
> Further testing seems to verify that either type works for starting
> nmbd and smbd, but I need forking for starting samba (AD) as samba
> dies shortly after starting it with notify.
>
>  From some systemd info:
> "If set to forking, it is expected that the process configured with
> ExecStart= will call fork() as part of its start-up. The parent
> process is expected to exit when start-up is complete and all
> communication channels are set up. The child continues to run as the
> main daemon process. This is the behavior of traditional UNIX
> daemons."
> I'm guessing that indeed the samba binary calls fork() as part of its
> start-up. Can this be verified? And how about the smbd and nmbd
> binaries, do they call fork() during stat-up?
>
> Chris
>




More information about the samba mailing list