On 12/07/16 19:53, Sonic wrote:> 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 >Are starting the 'smbd', 'nmbd' and samba binaries together ? Rowland
On Tue, Jul 12, 2016 at 3:00 PM, Rowland penny <rpenny at samba.org> wrote:> Are starting the 'smbd', 'nmbd' and samba binaries together ?I have "After=network.target nmbd.service" in my smbd.service file so nmbd will always start first. This is on my desktop system which is just a file sever "security = user". It appears that either type, forking or notify works fine on this system, although forking has been used successfully for many months. On a test system running an AD (server role = active directory domain controller) samba dies shortly after starting if I use Type=notify, only Type=forking is successful at keeping it running. Another strange oddity, referencing the page @ https://wiki.samba.org/index.php/Changing_the_DNS_backend#Changing_from_Samba_Internal_DNS_to_BIND_DLZ it appears that using that the "dns" entry in "server services" , either plain or prepended with a + or - has some bearing on whether or not one is using the internal DNS or BIND_DLZ. As I provisioned with BIND_DLZ I run fine with "dns" left out of the "server services" parm, but attempting to use "-dns" prevents samba from running properly - not all of the services start (winbondd for one) and it dies soon after starting. I'm wondering if that page is in error or if "-dns" is only valid if at one time previously samba was running with the internal DNS. Thanks, Chris
On 12/07/16 20:28, Sonic wrote:> On Tue, Jul 12, 2016 at 3:00 PM, Rowland penny <rpenny at samba.org> wrote: >> Are starting the 'smbd', 'nmbd' and samba binaries together ? > I have "After=network.target nmbd.service" in my smbd.service file so > nmbd will always start first. This is on my desktop system which is > just a file sever "security = user". It appears that either type, > forking or notify works fine on this system, although forking has been > used successfully for many months. > > On a test system running an AD (server role = active directory domain > controller) samba dies shortly after starting if I use Type=notify, > only Type=forking is successful at keeping it running. > > Another strange oddity, referencing the page @ > https://wiki.samba.org/index.php/Changing_the_DNS_backend#Changing_from_Samba_Internal_DNS_to_BIND_DLZ > it appears that using that the "dns" entry in "server services" , > either plain or prepended with a + or - has some bearing on whether or > not one is using the internal DNS or BIND_DLZ. As I provisioned with > BIND_DLZ I run fine with "dns" left out of the "server services" parm, > but attempting to use "-dns" prevents samba from running properly - > not all of the services start (winbondd for one) and it dies soon > after starting. I'm wondering if that page is in error or if "-dns" is > only valid if at one time previously samba was running with the > internal DNS. > > Thanks, > > ChrisOK, if you provisioned with BIND_DLZ you should find this line in smb.conf: server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbindd, ntp_signd, kcc, dnsupdate If you add -dns to the end of the line it may, as you have found out, cause problems. You should only add 'server services = -dns' if you were previously using the internal dns server and have upgraded to bind9 and DO NOT have a server services line in smb.conf. You could always add the entire line above instead, after you upgrade to Bind9. Rowland