$ sudo systemctl start samba-ad-dc
samba-ad-dc が起動する時
/var/log/samba/log.smbd だったか /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
となっている。
53ポートが使えなかったように見える。
$ sudo lsof -i:53
すると
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)
となり、systemd-resolve というのが :53 を使ってる。
なので、止めてしまう
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
:53 使えるようになった
参考
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1690099
https://askubuntu.com/questions/898605/how-to-disable-systemd-resolved-and-resolve-dns-with-dnsmasq
コメント