xref: /netbsd-src/external/mpl/bind/dist/bin/check/named-checkconf.rst (revision 2dd295436a0082eb4f8d294f4aa73c223413d0f2)
1.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
2..
3.. SPDX-License-Identifier: MPL-2.0
4..
5.. This Source Code Form is subject to the terms of the Mozilla Public
6.. License, v. 2.0.  If a copy of the MPL was not distributed with this
7.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
8..
9.. See the COPYRIGHT file distributed with this work for additional
10.. information regarding copyright ownership.
11
12.. highlight: console
13
14.. _man_named-checkconf:
15
16named-checkconf - named configuration file syntax checking tool
17---------------------------------------------------------------
18
19Synopsis
20~~~~~~~~
21
22:program:`named-checkconf` [**-chjlvz**] [**-p** [**-x** ]] [**-t** directory] {filename}
23
24Description
25~~~~~~~~~~~
26
27``named-checkconf`` checks the syntax, but not the semantics, of a
28``named`` configuration file. The file, along with all files included by it, is parsed and checked for syntax
29errors. If no file is specified,
30``/etc/named.conf`` is read by default.
31
32Note: files that ``named`` reads in separate parser contexts, such as
33``rndc.key`` and ``bind.keys``, are not automatically read by
34``named-checkconf``. Configuration errors in these files may cause
35``named`` to fail to run, even if ``named-checkconf`` was successful.
36However, ``named-checkconf`` can be run on these files explicitly.
37
38Options
39~~~~~~~
40
41``-h``
42   This option prints the usage summary and exits.
43
44``-j``
45   When loading a zonefile, this option instructs ``named`` to read the journal if it exists.
46
47``-l``
48   This option lists all the configured zones. Each line of output contains the zone
49   name, class (e.g. IN), view, and type (e.g. primary or secondary).
50
51``-c``
52   This option specifies that only the "core" configuration should be checked. This suppresses the loading of
53   plugin modules, and causes all parameters to ``plugin`` statements to
54   be ignored.
55
56``-i``
57   This option ignores warnings on deprecated options.
58
59``-p``
60   This option prints out the ``named.conf`` and included files in canonical form if
61   no errors were detected. See also the ``-x`` option.
62
63``-t directory``
64   This option instructs ``named`` to chroot to ``directory``, so that ``include`` directives in the
65   configuration file are processed as if run by a similarly chrooted
66   ``named``.
67
68``-v``
69   This option prints the version of the ``named-checkconf`` program and exits.
70
71``-x``
72   When printing the configuration files in canonical form, this option obscures
73   shared secrets by replacing them with strings of question marks
74   (``?``). This allows the contents of ``named.conf`` and related files
75   to be shared - for example, when submitting bug reports -
76   without compromising private data. This option cannot be used without
77   ``-p``.
78
79``-z``
80   This option performs a test load of all zones of type ``primary`` found in ``named.conf``.
81
82``filename``
83   This indicates the name of the configuration file to be checked. If not specified,
84   it defaults to ``/etc/named.conf``.
85
86Return Values
87~~~~~~~~~~~~~
88
89``named-checkconf`` returns an exit status of 1 if errors were detected
90and 0 otherwise.
91
92See Also
93~~~~~~~~
94
95:manpage:`named(8)`, :manpage:`named-checkzone(8)`, BIND 9 Administrator Reference Manual.
96