$ sudo systemctl start samba-ad-dc
When starting samba-ad-dc, you might see the following in /var/log/samba/log.smbd
or /var/log/samba/%m
:
[2018/09/04 10:15:54.282382, 0] ../source4/smbd/server.c:620(binary_smbd_main) samba: using 'standard' process model samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. [2018/09/04 10:15:54.331785, 0] ../source4/smbd/service_stream.c:360(stream_setup_socket) samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor. Failed to listen on 0.0.0.0:53 - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED [2018/09/04 10:15:54.336989, 0] ../source4/dns_server/dns_server.c:648(dns_add_socket) Failed to bind to 0.0.0.0:53 TCP - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED
It appears that port 53 couldn't be used.
$ sudo lsof -i:53
When you run this command, you might see:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME systemd-r 483 systemd-resolve 12u IPv4 16576 0t0 UDP 127.0.0.53:domain systemd-r 483 systemd-resolve 13u IPv4 16577 0t0 TCP 127.0.0.53:domain (LISTEN)
The process systemd-resolve
is using port 53.
Therefore, you need to stop it:
sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved
$ sudo systemctl stop samba-ad-dc
$ sudo systemctl start samba-ad-dc
$ sudo lsof -i:53
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
samba 2674 root 36u IPv6 39433 0t0 TCP *:domain (LISTEN)
samba 2674 root 38u IPv6 39434 0t0 UDP *:domain
samba 2674 root 39u IPv4 39435 0t0 TCP *:domain (LISTEN)
samba 2674 root 40u IPv4 39436 0t0 UDP *:domain
Now port 53 is available.
References:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1690099
https://askubuntu.com/questions/898605/how-to-disable-systemd-resolved-and-resolve-dns-with-dnsmasq
Comments