Red Hat Certified System Administrator RHCSA · Free Practice Question Medium

Question 2

On ServerB, configure NTP synchronization using the Chrony service to ensure accurate timekeeping. Verify that the Chrony service is running and that NTP synchronization is active.

  • A

    Pass

  • B

    Fail

Reveal correct answer

Correct answer: A

Explanation

Answer:

To configure and verify NTP synchronization on ServerB, follow these steps:

Step-by-Step Solution

  1. Check the Current System Time and Time Zone Settings:

    • Explanation: The timedatectl command shows the current system time, time zone, and NTP synchronization status. This is useful to confirm the current configuration before making changes.

  2. Install the Chrony Package:

    • Explanation: Chrony is the default NTP service on many modern Linux distributions, preferred for its efficiency in handling network time synchronization. This command installs the Chrony package, which includes the chronyd daemon.

  3. Enable and Start the Chrony Service:

    • Explanation: This command enables chronyd to start on boot and starts the service immediately. Chrony will begin syncing time with the NTP servers configured in /etc/chrony.conf.

  4. Verify that the Chrony Service is Running:

    • Explanation: Displays the status of the chronyd service. Look for “active (running)” in the output, which confirms that the service is functioning correctly.

  5. Review the Chrony Configuration:

    • Explanation: Displays the contents of the Chrony configuration file, typically located at /etc/chrony.conf. This file specifies the NTP servers used for time synchronization, which are often set to public pools by default. Adjust these as necessary for local or organizational NTP servers.

  6. Enable NTP Synchronization:

    • Explanation: This command enables NTP synchronization, allowing the system clock to be synchronized with the NTP servers defined by Chrony. It is particularly useful if NTP sync is not already enabled.

    • Note: NTP (Network Time Protocol) ensures the system time is consistent and accurate by syncing with remote time servers. Accurate timekeeping is essential for logging, security, debugging, and authentication processes on a Linux system.

  7. Verify NTP Synchronization Status:

    • Explanation: Run timedatectl again to confirm that NTP synchronization is enabled. The output should show “NTP synchronized: yes” and the system clock set to the current time.

Additional Notes for Learners:

  • Why Use Chrony:

    • Chrony is preferred over older NTP implementations for its ability to quickly synchronize time on systems with irregular network connections or virtualized environments. It’s also more accurate and efficient for systems with intermittent or limited connectivity.

  • Key Configuration Options in /etc/chrony.conf:

    • You can adjust the list of NTP servers by modifying or adding pool or server entries. This is useful if you need to sync with a specific organizational or local NTP server.

  • Troubleshooting:

    • Chrony Service Issues: If chronyd doesn’t start, check for typos in the /etc/chrony.conf file and ensure there are no conflicting services (such as ntpd).

    • Time Sync Not Reflecting: Run timedatectl to verify that NTP is enabled and active. If not, re-run timedatectl set-ntp true.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need