[ntp:questions] Re: Using NTPDC - keyid required

Jan Ceuleers janspam.ceuleers at computer.org
Sun Dec 7 17:42:11 UTC 2003


On Sun, 07 Dec 2003 11:03:23 GMT, "David J Taylor"
<david-taylor at blueyonder.co.uk.not-this-bit> wrote:

>I have Terje Mathisen's Windows build of NTP, and want to try some
>commands using NTPDC (to atemmpt to drop and re-connect to a given
>server).  However, the program is asking for a keyid that I don't have,
>not having configured one for normal NTP use.
>
>Can I use NTPDC, and if so, how?

Ntpdc needs a keyid and password if you want to use it to *change*, as
opposed to just *view* your ntpd's runtime configuration and status.
That includes dropping and adding servers.

Here's how you set one up:

1. Create a file named keys in the same directory as your drift file.
On my Linux system that's in /etc/ntp/ ; under windows it would be
something like c:\windows\system32\drivers\etc\ntp\

2. Create at least one line in that file which is not a comment
(comments start by #) of the following format:

keyid	M	password

That is: the keyid is a number (such as 2345), the M is just the
letter M and the password is an alphanumeric password of your choice
(e.g. mifive007). To make it absolutely clear, the line corresponding
with this example is

2345	M	mifive007

3. Add the following lines to your ntp.conf:

disable auth
keys c:\windows\system32\drivers\etc\ntp\keys
requestkey 2345

4. Restart ntp.

5. You can now use this keyid and password from ntpdc. Two options:
you either specify these values up-front using ntpdc's keyid and
passwd commands, or you can allow ntpdc to prompt you the first time
you issue a command (such as unconfig) for which it needs them.


Hope this helps.



More information about the questions mailing list