---
slug: "ubuntu-samba-ad-dc-dns"
title: "Ubuntu18 Samba 4.7 で ADドメインコントローラ(samba-ad-dc)を起動してる時、DNSのエラーが出て動作しない場合"
description: "$ sudo systemctl start samba-ad-dc\nsamba-ad-dc が起動する時/var/log/samba/log.smbd だったか /var/log/samba/%m 見てみると\n53ポートが使えなかったように見える。"
url: "https://www.ytyng.com/blog/ubuntu-samba-ad-dc-dns"
publish_date: "2018-09-04T01:53:11Z"
created: "2018-09-04T01:53:11Z"
updated: "2026-02-27T09:46:42.979Z"
categories: []
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20230812/9a5678166ae34db1b3c34b715eb83829.png.webp?width=768"
has_video: false
has_music: false
video_urls: []
music_urls: []
lang: "ja"
---

# Ubuntu18 Samba 4.7 で ADドメインコントローラ(samba-ad-dc)を起動してる時、DNSのエラーが出て動作しない場合

<pre>$ sudo systemctl start samba-ad-dc</pre>
<p>samba-ad-dc が起動する時<br /><br /><br />/var/log/samba/log.smbd だったか /var/log/samba/%m 見てみると</p>
<pre style="background-color: #ffffff; color: #000000; font-family: 'Menlo'; font-size: 9.0pt;"><span style="color: #c604b7; font-weight: bold;">[2018/09/04 10:15:54.282382,  0]</span> ../source4/smbd/server.c:620(binary_smbd_main)<br />  samba: using 'standard' process model<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br /><span style="color: #c604b7; font-weight: bold;">[2018/09/04 10:15:54.331785,  0]</span> ../source4/smbd/service_stream.c:360(stream_setup_socket)<br />samba: setproctitle not initialized, please either call setproctitle_init() or link against libbsd-ctor.<br />  Failed to listen on 0.0.0.0:53 - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED<br /><span style="color: #c604b7; font-weight: bold;">[2018/09/04 10:15:54.336989,  0]</span> ../source4/dns_server/dns_server.c:648(dns_add_socket)<br />  Failed to bind to 0.0.0.0:53 TCP - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED<br /><br /></pre>
<p>となっている。<br />53ポートが使えなかったように見える。</p>
<pre style="background-color: #ffffff; color: #000000; font-family: 'Menlo'; font-size: 9.0pt;">$ sudo lsof -i:53</pre>
<p>すると</p>
<pre style="background-color: #ffffff; color: #000000; font-family: 'Menlo'; font-size: 9.0pt;">COMMAND   PID            USER   FD   TYPE DEVICE SIZE/OFF NODE NAME<br />systemd-r 483 systemd-resolve   12u  IPv4  16576      0t0  UDP 127.0.0.53:domain<br />systemd-r 483 systemd-resolve   13u  IPv4  16577      0t0  TCP 127.0.0.53:domain (LISTEN)</pre>
<p>となり、systemd-resolve というのが :53 を使ってる。</p>
<p>なので、止めてしまう</p>
<pre style="background-color: #ffffff; color: #000000; font-family: 'Menlo'; font-size: 9.0pt;">sudo systemctl stop systemd-resolved<br />sudo systemctl disable systemd-resolved</pre>
<pre style="background-color: #ffffff; color: #000000; font-family: 'Menlo'; font-size: 9.0pt;">$ sudo systemctl stop samba-ad-dc<br />$ sudo systemctl start samba-ad-dc</pre>
<pre style="background-color: #ffffff; color: #000000; font-family: 'Menlo'; font-size: 9.0pt;">$ sudo lsof -i:53<br />COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME<br />samba   2674 root   36u  IPv6  39433      0t0  TCP *:domain (LISTEN)<br />samba   2674 root   38u  IPv6  39434      0t0  UDP *:domain<br />samba   2674 root   39u  IPv4  39435      0t0  TCP *:domain (LISTEN)<br />samba   2674 root   40u  IPv4  39436      0t0  UDP *:domain</pre>
<p>:53&nbsp; 使えるようになった<br /><br /><br />参考</p>
<p>https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1690099</p>
<p><br />https://askubuntu.com/questions/898605/how-to-disable-systemd-resolved-and-resolve-dns-with-dnsmasq</p>
