Ubuntu

Samba-ad-dcでTXTレコード更新失敗

ホームラボで稼働しているSamba-ad-dcは、DNSサーバーとして各種サービスを支えている。
今回、ちょっとメールサーバーをどうにかしようとして、SPFレコードを更新しようとして時間を取られたのでメモ。



広告


テキストレコードはこんな形で登録される。

$ samba-tool dns add localhost rohhie.net test TXT "a b c" -U Administrator
$ dig test.rohhie.net -t txt +short @localhost
"a" "b" "c"

$ samba-tool dns add localhost rohhie.net test TXT 'a b c'
$ dig test.rohhie.net -t txt +short @localhost
"a" "b" "c"

このレコードを消すには以下のコマンドが使える。

$ samba-tool dns delete localhost rohhie.net test TXT "a b c"

では、繋がった文字列として登録するにはどうしたら良いかというと、これでできる。

$ samba-tool dns add localhost rohhie.net test TXT "'a b c'"
$ dig test.rohhie.net -t txt +short @localhost
"a b c"

$ samba-tool dns add localhost rohhie.net test TXT '"a b c"'
$ dig test.rohhie.net -t txt +short @localhost
"a b c"

このレコードを消すには以下のコマンドが使える。

$ samba-tool dns delete localhost rohhie.net test TXT "'a b c'"

では、アップデートしてみましょう。

$ samba-tool dns update localhost rohhie.net test TXT "a b c" "A B C"
ERROR: Record or zone does not exist. ※今回はこのエラーでおおはまり

$ samba-tool dns update localhost rohhie.net test TXT "'a b c'" "'A B C'"
$ dig test.rohhie.net -t txt +short @localhost
"A B C"

過去に何回かこの問題にハマったのだけれど、書き残していなくて思い出せなかった。
解決にとても時間が掛かったので、今回はメモとして残しておくことにする。

広告

コメントはこちらから お気軽にどうぞ ~ 投稿に関するご意見・感想・他