Winfried
2017-Jun-19 10:43 UTC
[Samba] [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
So it looks like the init script in the Samba package in the Debian repository needs to be edited for a non-DC home server. -- View this message in context: http://samba.2283325.n4.nabble.com/4-2-14-Debian-Smbd-not-listening-on-192-168-0-x-on-cold-start-tp4720131p4720160.html Sent from the Samba - General mailing list archive at Nabble.com.
Reindl Harald
2017-Jun-19 11:16 UTC
[Samba] [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
Am 19.06.2017 um 12:43 schrieb Winfried via samba:> So it looks like the init script in the Samba package in the Debian > repository needs to be edited for a non-DC home server.Restart through Init script: =======root at debian:~# /etc/init.d/samba restart [ ok ] Restarting nmbd (via systemctl): nmbd.service. [ ok ] Restarting smbd (via systemctl): smbd.service. [ ok ] Restarting samba-ad-dc (via systemctl): samba-ad-dc.service. ======= the main problem is that unholy mix of "we start different services with a single init script" instead have 3 init scripts which are properly ordered and can be enabled/disabled indepdendent with sysvinit it don't matter that much because it has anyways no clue about service status (and PID files are just a drity workaround for missing capabilities) but that's the problem with sysvinit - nothing really matters, everything works somehow and each distribution has it's own crappy ways to implement the service scripts and their configuration
Rowland Penny
2017-Jun-19 11:22 UTC
[Samba] [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
On Mon, 19 Jun 2017 03:43:13 -0700 (PDT) Winfried via samba <samba at lists.samba.org> wrote:> So it looks like the init script in the Samba package in the Debian > repository needs to be edited for a non-DC home server. >Two things here, it is your computer and you can do what you like with it, secondly, I personally do not think that the 'samba' init script should try and start a Samba AD DC if there is a separate init script to do this. I personally would edit the init script, or you could do what I do, set the nmbd & smbd init scripts to be started at boot, instead of running 'samba' at boot. This is all you need on a standalone server, but if your Samba machine is a Unix domain member, you will also need winbind to be started at boot. Rowland
L.P.H. van Belle
2017-Jun-19 11:59 UTC
[Samba] [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
Hai, First he had problems with the suspend mode. See samba list subject : [Samba] Upgraded > Samba no longer listening on 192.168.0.x That got fixed, without changing any startup script, but by adding the interfaces line to smb.conf Now this one, ( sorry but winfried not attacking you, im attacting nobody ) And yes, that fix was from me to add that line, but not knowing you would hit the other bug. The best ( only good) fix, change the interface names to ipnumbers smb.conf Simple and works always. The problem is, this can be multiple things. If at boot a DNS server does not resolve.. Result samba not starting. If a hosts file is wrongly configured.. Result samba not starting. If the interface errors in up.. Result samba not starting. Now after adding the ipnumbers in smb.conf you never have startup problems again. Samba wil always start even if the interface is down. How, i know, i do this as of samba 3.6 already, as of Debian Wheezy, since thats when it started. And yes, Rowland would adjust the initscript, but he uses devuan, like jessie but without these files : /lib/systemd/system/ nmbd.service smbd.service samba-ad-dc.service samba.service winbind.service In my opinion, you should try to change none of the by debian supplied files. If it exists, use any include.d folder. And after upgradeing to debian Stretch use: systemctl edit ..... To change the startup order. But as far as i did see in the 4.5.x packages ( and 4.6.x ) on debian systemd is correctly setup for samba. Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > Rowland Penny via samba > Verzonden: maandag 19 juni 2017 13:22 > Aan: samba at lists.samba.org > Onderwerp: Re: [Samba] [4.2.14-Debian] Smbd not listening on > 192.168.0.x on cold start > > On Mon, 19 Jun 2017 03:43:13 -0700 (PDT) Winfried via samba > <samba at lists.samba.org> wrote: > > > So it looks like the init script in the Samba package in the Debian > > repository needs to be edited for a non-DC home server. > > > > Two things here, it is your computer and you can do what you > like with it, secondly, I personally do not think that the > 'samba' init script should try and start a Samba AD DC if > there is a separate init script to do this. > > I personally would edit the init script, or you could do what > I do, set the nmbd & smbd init scripts to be started at boot, > instead of running 'samba' at boot. > > This is all you need on a standalone server, but if your > Samba machine is a Unix domain member, you will also need > winbind to be started at boot. > > Rowland > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >
Winfried
2017-Jun-20 09:42 UTC
[Samba] [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
Thanks much for the infos. I edited the "interfaces" line in smb.conf, and will reconfigure systemd so that 1) the network service is launched before smbd and nmbd, and 2) samba-ad-dc.service is disabled (since I don't need this on a standalone server). -- View this message in context: http://samba.2283325.n4.nabble.com/4-2-14-Debian-Smbd-not-listening-on-192-168-0-x-on-cold-start-tp4720131p4720213.html Sent from the Samba - General mailing list archive at Nabble.com.
L.P.H. van Belle
2017-Jun-20 10:12 UTC
[Samba] [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
Hai, Really, you dont need to edit the systemd files. Try first with only the interface change. Then if you still need to edit the systemd files. You need these settings, but i dont thing you need it after the interface change. cat /lib/systemd/system/smbd.service [Unit] Description=Samba SMB Daemon Documentation=man:smbd(8) man:samba(7) man:smb.conf(5) After=network.target nmbd.service winbind.service [Service] Type=notify NotifyAccess=all PIDFile=/var/run/samba/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 ------------------ cat /lib/systemd/system/nmbd.service [Unit] Description=Samba NMB Daemon Documentation=man:nmbd(8) man:samba(7) man:smb.conf(5) After=network-online.target Wants=network-online.target [Service] Type=notify NotifyAccess=all PIDFile=/var/run/samba/nmbd.pid EnvironmentFile=-/etc/default/samba ExecStart=/usr/sbin/nmbd $NMBDOPTIONS ExecReload=/bin/kill -HUP $MAINPID LimitCORE=infinity [Install] WantedBy=multi-user.target --------------- But again, i never change these file, its just not needed imo. P.s. For starting servers after you network is completely up. You need these After=network-online.target ( maybe also other's) Wants=network-online.target Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > Winfried via samba > Verzonden: dinsdag 20 juni 2017 11:42 > Aan: samba at lists.samba.org > Onderwerp: Re: [Samba] [4.2.14-Debian] Smbd not listening on > 192.168.0.x on cold start > > Thanks much for the infos. > > I edited the "interfaces" line in smb.conf, and will > reconfigure systemd so that 1) the network service is > launched before smbd and nmbd, and 2) samba-ad-dc.service is > disabled (since I don't need this on a standalone server). > > > > -- > View this message in context: > http://samba.2283325.n4.nabble.com/4-2-14-Debian-Smbd-not-list > ening-on-192-168-0-x-on-cold-start-tp4720131p4720213.html > Sent from the Samba - General mailing list archive at Nabble.com. > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >