]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
examples: update for removed cmdmon authentication
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 26 Aug 2015 07:49:19 +0000 (09:49 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 26 Aug 2015 08:19:33 +0000 (10:19 +0200)
examples/chrony.conf.example2
examples/chrony.conf.example3
examples/chrony.keys.example
examples/chrony.logrotate
examples/chrony.nm-dispatcher

index 7c61b0aa903cba47de4dcc43ea87d35e0ba7c659..659d6761c2ed913e19c602f7fc7c5150ab664911 100644 (file)
@@ -18,14 +18,8 @@ rtcsync
 # Serve time even if not synchronized to any NTP server.
 #local stratum 10
 
-# Specify file containing keys for NTP and command authentication.
-keyfile /etc/chrony.keys
-
-# Specify key number for command authentication.
-commandkey 1
-
-# Generate new command key on start if missing.
-generatecommandkey
+# Specify file containing keys for NTP authentication.
+#keyfile /etc/chrony.keys
 
 # Disable logging of client accesses.
 noclientlog
index 9f2bbe5f0c5115898dc7716def0140fd7861be08..1317a11adb7a2a79a7bdeed462da673b4c4dc98a 100644 (file)
 
 driftfile /var/lib/chrony/drift
 
-# If you want to use the program called chronyc to configure aspects of
-# chronyd's operation once it is running (e.g. tell it the Internet link
-# has gone up or down), you need a password.  This is stored in the
-# following keys file.  (You also need keys to support authenticated NTP
-# exchanges between cooperating machines.)  Again, this option is
-# assumed by default.
+# If you want to enable NTP authentication with symmetric keys, you will need
+# to uncomment the following line and edit the file to set up the keys.
 
-keyfile /etc/chrony.keys
-
-# Tell chronyd which numbered key in the file is used as the password
-# for chronyc. (You can pick any integer up to 2**32-1.  '1' is just a
-# default.  Using another value will _NOT_ increase security.)
-
-commandkey 1
-
-# With this directive a random password will be generated automatically.
-
-generatecommandkey
+! keyfile /etc/chrony.keys
 
 # chronyd can save the measurement history for the servers to files when
 # it it exits.  This is useful in 2 situations:
@@ -262,11 +248,6 @@ generatecommandkey
 # syntax and meaning is the same as for 'allow' and 'deny', except that
 # 'cmdallow' and 'cmddeny' control access to the chronyd's command port.
 
-# NOTE, even if the host where you run chronyc is granted access, you
-# still need a command key set up and you have to know the password to
-# put into chronyc to allow you to modify chronyd's parameters.  By
-# default all you can do is view information about chronyd's operation.
-
 #######################################################################
 ### REAL TIME CLOCK
 # chronyd can characterise the system's real-time clock.  This is the
index 158317407ec29784e590bc831b87835e7a9046f0..e6660ae28b66ac9cd43fd9cb1810b3786d6b1b19 100644 (file)
@@ -1,29 +1,15 @@
-#######################################################################
+# This is an example chrony keys file.  It is used for NTP authentication with
+# symmetric keys.  It should be readable only by root or the user to which
+# chronyd is configured to switch to.
 #
-# This is an example chrony keys file.  You should copy it to /etc/chrony.keys
-# after editing it to set up the key(s) you want to use.  It should be readable
-# only by root or the user chronyd drops the root privileges to.  In most
-# situations, you will require a single key (the 'commandkey') so that you can
-# supply a password to chronyc to enable you to modify chronyd's operation
-# whilst it is running.
-#
-# Copyright 2002 Richard P. Curnow
-#
-######################################################################
+# Don't use the example keys!  The keys need to be random for maximum security.
+# These shell commands can be used to generate random MD5 and SHA1 keys on
+# systems which have the /dev/urandom device:
+# echo "1 MD5 HEX:$(tr -d -c '[:xdigit:]' < /dev/urandom | head -c 32)"
+# echo "1 SHA1 HEX:$(tr -d -c '[:xdigit:]' < /dev/urandom | head -c 40)"
 
 # Examples of valid keys:
 
 #1 ALongAndRandomPassword
 #2 MD5 HEX:B028F91EA5C38D06C2E140B26C7F41EC
 #3 SHA1 HEX:1DC764E0791B11FA67EFC7ECBC4B0D73F68A070C
-
-# The keys should be random for maximum security.  If you wanted to use a key
-# with ID 1 as your commandkey (i.e. chronyc password) you would put
-# "commandkey 1" into chrony.conf.  If no commandkey is present in the keys
-# file and the generatecommandkey directive is specified in chrony.conf,
-# a random commandkey will be generated and added to the keys file
-# automatically on chronyd start.
-
-# You might want to define more keys if you use the authentication facility
-# in the network time protocol to authenticate request/response packets between
-# trusted clients and servers.
index e0cd83cec7fd41840fc395b7aa11f443105cc398..2823a1aa90e433e920883a22fcddb21bc7647562 100644 (file)
@@ -3,6 +3,6 @@
     nocreate
     sharedscripts
     postrotate
-        /usr/bin/chronyc -a cyclelogs > /dev/null 2>&1 || true
+        /usr/bin/chronyc cyclelogs > /dev/null 2>&1 || true
     endscript
 }
index d23700b51e794951f81a142a3cba50165b81428d..084aed64e0d729c99fa1746b0d0e632b772f7144 100644 (file)
@@ -6,12 +6,12 @@ export LC_ALL=C
 
 if [ "$2" = "up" ]; then
        /sbin/ip route list dev "$1" | grep -q '^default' &&
-               /usr/bin/chronyc -a online > /dev/null 2>&1
+               /usr/bin/chronyc online > /dev/null 2>&1
 fi
 
 if [ "$2" = "down" ]; then
        /sbin/ip route list | grep -q '^default' ||
-               /usr/bin/chronyc -a offline > /dev/null 2>&1
+               /usr/bin/chronyc offline > /dev/null 2>&1
 fi
 
 exit 0