Rowland Penny
2017-Jun-18 11:06 UTC
[Samba] [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
On Sun, 18 Jun 2017 02:55:22 -0700 (PDT) Winfried via samba <samba at lists.samba.org> wrote:> Forgot to give the smb.conf: >OK, it looks like you are trying to set up a standalone server with guest access, I suggest you read this wiki page: https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server You do not need most of the parameters you have added to smb.conf, you most definitely don't need this one: server services = +smb This should only be added to a smb.conf on a Samba AD DC and only then if you had been using the deprecated (and now no longer built by default) ntvfs code. You should also investigate why this is happening: [ ok ] Restarting samba-ad-dc (via systemctl): samba-ad-dc.service. This is probably being done by the 'samba' init script, but it shouldn't, it should be that the 'samba' init script starts the 'smbd' & 'nmbd' binaries or 'samba-ad-dc' starts the 'samba' binary. If your 'samba' init script tries to start all the binaries I have mentioned, I would class this as a bug. I would not worry about your samba standalone server not listening on '192.168.0.7' ports 139 & 445. The Unix domain member I am typing this on doesn't either and I have never noticed any problems. Rowland
Winfried
2017-Jun-19 09:42 UTC
[Samba] [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
Thanks for the infos. I'm running 4.2.14. I always use apt-get to install/upgrade packages, so the init script comes standard from the official repository: ==============root at debian:~# cat /etc/init.d/samba #!/bin/sh ### BEGIN INIT INFO # Provides: samba # Required-Start: # Required-Stop: # Default-Start: # Default-Stop: # Short-Description: ensure Samba daemons are started (nmbd and smbd) ### END INIT INFO set -e # start nmbd, smbd and samba-ad-dc unconditionally # the init scripts themselves check if they are needed or not case $1 in start) /etc/init.d/nmbd start /etc/init.d/smbd start /etc/init.d/samba-ad-dc start ;; stop) /etc/init.d/samba-ad-dc stop /etc/init.d/smbd stop /etc/init.d/nmbd stop ;; reload) /etc/init.d/smbd reload ;; restart|force-reload) /etc/init.d/nmbd "$1" /etc/init.d/smbd "$1" /etc/init.d/samba-ad-dc "$1" ;; status) status=0 NMBD_DISABLED=`testparm -s --parameter-name='disable netbios' 2>/dev/null || true` SERVER_ROLE=`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1 || true` if [ "$SERVER_ROLE" != "active directory domain controller" ]; then if [ "$NMBD_DISABLED" != "Yes" ]; then /etc/init.d/nmbd status || status=$? fi /etc/init.d/smbd status || status=$? else /etc/init.d/samba-ad-dc status || status=$? fi exit $status ;; *) echo "Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload|status}" exit 1 ;; esac ============== Should I just comment out the "/etc/init.d/samba-ad-dc" lines in start/stop, or should I also edit smb.conf to edit the "interface" command? -- 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-tp4720131p4720150.html Sent from the Samba - General mailing list archive at Nabble.com.
L.P.H. van Belle
2017-Jun-19 10:15 UTC
[Samba] [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
Hai, There is nothing wrong with the debian script. If it does not work, ( like this one ), failing to start at boot time. The make the change i suggested, one of these 2 wil fix it. There are few know things, these involve these settings. interfaces = 192.168.0.1 127.0.0.1 Or interfaces = eth0 lo and bind interfaces only = yes 1) smb.conf: use "bind interfaces only", but no interfaces defined in smb.conf, samba may fail to start at boot time. restart always works. 2) smb.conf: "use interfaces = eth0 lo" samba may fail to start at boot time, fix, use ipnumbers. restart always works. 3) which works always correct, so samba starts at boot time. bind interfaces only = yes interfaces = 192.168.0.1 127.0.0.1 Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > Winfried via samba > Verzonden: maandag 19 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 for the infos. > > I'm running 4.2.14. I always use apt-get to install/upgrade > packages, so the init script comes standard from the official > repository: > > ==============> root at debian:~# cat /etc/init.d/samba > #!/bin/sh > > ### BEGIN INIT INFO > # Provides: samba > # Required-Start: > # Required-Stop: > # Default-Start: > # Default-Stop: > # Short-Description: ensure Samba daemons are started (nmbd > and smbd) ### END INIT INFO > > set -e > > # start nmbd, smbd and samba-ad-dc unconditionally # the init > scripts themselves check if they are needed or not case $1 in > start) > /etc/init.d/nmbd start > /etc/init.d/smbd start > /etc/init.d/samba-ad-dc start > ;; > stop) > /etc/init.d/samba-ad-dc stop > /etc/init.d/smbd stop > /etc/init.d/nmbd stop > ;; > reload) > /etc/init.d/smbd reload > ;; > restart|force-reload) > /etc/init.d/nmbd "$1" > /etc/init.d/smbd "$1" > /etc/init.d/samba-ad-dc "$1" > ;; > status) > status=0 > NMBD_DISABLED=`testparm -s > --parameter-name='disable netbios' 2>/dev/null || true` > SERVER_ROLE=`samba-tool testparm > --parameter-name="server role" 2>/dev/null | tail -1 || true` > if [ "$SERVER_ROLE" != "active directory > domain controller" > ]; then > if [ "$NMBD_DISABLED" != "Yes" ]; then > /etc/init.d/nmbd status || status=$? > fi > /etc/init.d/smbd status || status=$? > else > /etc/init.d/samba-ad-dc status || status=$? > fi > exit $status > ;; > *) > echo "Usage: /etc/init.d/samba > {start|stop|reload|restart|force-reload|status}" > exit 1 > ;; > esac > ==============> > Should I just comment out the "/etc/init.d/samba-ad-dc" lines > in start/stop, or should I also edit smb.conf to edit the > "interface" command? > > > > -- > 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-tp4720131p4720150.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 >
Reindl Harald
2017-Jun-19 10:15 UTC
[Samba] [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
Am 19.06.2017 um 11:42 schrieb Winfried via samba:> ### BEGIN INIT INFO > # Provides: samba > # Required-Start: > # Required-Stop: > # Default-Start: > # Default-Stop: > # Short-Description: ensure Samba daemons are started (nmbd and smbd) > ### END INIT INFOwell, there is no ordering with network services most likely your samba starts before the network is fully up with systemd you would just say "After=network.service systemd-networkd.service network-online.target" in the unit
Rowland Penny
2017-Jun-19 10:41 UTC
[Samba] [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
On Mon, 19 Jun 2017 12:15:03 +0200 "L.P.H. van Belle via samba" <samba at lists.samba.org> wrote:> Hai, > > There is nothing wrong with the debian script.In my opinion there is, it tries to start nmbd, then smbd, then samba, this is stupid and yes I know that the individual init scripts check if Samba is running as a DC. Manually running 'smbd' on a DC is not allowed, so why try to run a Samba DC after you have possibly just started the 'nmbd' and 'smbd' binaries ? Rowland
Maybe Matching Threads
- [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
- [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
- [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
- [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start
- [4.2.14-Debian] Smbd not listening on 192.168.0.x on cold start