[Samba] Option configure

Achim Gottinger achim at ag-web.biz
Tue Jul 12 20:03:49 UTC 2016



Am 12.07.2016 um 21:35 schrieb Rowland penny:
> On 12/07/16 20:25, Achim Gottinger wrote:
>> 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
>>
>>
>
> that is basically what init scripts do, i.e if fileserver start the 
> nmbd, smbd and winbindd binaries, if AD DC just start the samba 
> binary, but is this what Sonic is doing ?
>
> Rowland
>
>
He mentioned using systemctl start samba.
I can not run this here becuase it is masked an no samba.service file 
exists in the backport.
This is intentional on debian see here. 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769714
With LSB init scripts the samba script started smbd,nmbd and samba-ad-dc 
scripts. These checked smb.conf for the addc role and decided themselfes 
if they must start or not.
Updating debian from backported 4.4.3 to backported 4.4.5 was abit messy 
(thank you systemd). Had to comment out the server role line on my 
addc's and stop samba. After the update i had to reenable to server role 
line and mask unmask services as described earlier.


These are the other service files from 4.4.5+dfsg-2

smbd.service
[Unit]
Description=Samba SMB Daemon
Documentation=man:smbd(8) man:samba(7) man:smb.conf(5)
After=network.target nmb.service winbind.service

[Service]
Type=notify
NotifyAccess=all
PIDFile=/run/smbd.pid
LimitNOFILE=16384
EnvironmentFile=-/etc/default/samba
ExecStart=/usr/sbin/smbd $SMBDOPTIONS
ExecReload=/bin/kill -HUP $MAINPID
LimitCORE=infinity

[Install]
WantedBy=multi-user.target

nmbd.service
[Unit]
Description=Samba NMB Daemon
Documentation=man:nmbd(8) man:samba(7) man:smb.conf(5)
After=network.target

[Service]
Type=notify
NotifyAccess=all
PIDFile=/run/nmbd.pid
EnvironmentFile=-/etc/default/samba
ExecStart=/usr/sbin/nmbd $NMBDOPTIONS
ExecReload=/bin/kill -HUP $MAINPID
LimitCORE=infinity

[Install]
WantedBy=multi-user.target

winbind.service
[Unit]
Description=Samba Winbind Daemon
Documentation=man:winbindd(8) man:samba(7) man:smb.conf(5)
After=network.target nmb.service

[Service]
Type=notify
NotifyAccess=all
PIDFile=/run/winbindd.pid
EnvironmentFile=-/etc/default/samba
ExecStart=/usr/sbin/winbindd "$WINBINDOPTIONS"
ExecReload=/bin/kill -HUP $MAINPID
LimitCORE=infinity

[Install]
WantedBy=multi-user.target




More information about the samba mailing list