Red Hat Certified System Administrator RHCSA · Free Practice Question Easy
Question 32
On ServerB, ensure NTP sync is configured.
-
A
Fail
-
B
Pass
Reveal correct answer
Correct answer: B
Explanation
To configure Network Time Protocol (NTP) synchronization on ServerB using Chrony, which ensures accurate system time, follow these steps:
Verify Current Time Settings
Run the following command to view the system clock and time zone:
- # timedatectl
Explanation: This shows the current time, time zone, and NTP sync status. Look for "NTP synchronized" to confirm if NTP is already enabled.
Install the Chrony Package
Install Chrony, the recommended NTP synchronization service on RHEL:
- # dnf install chrony -y
Explanation: Chrony provides accurate and efficient NTP synchronization, making it ideal for systems with periodic connectivity.
Enable and Start the Chrony Service
Immediately start and enable Chrony to start at boot:
- # systemctl enable chronyd --now
Explanation: This command ensures that the Chrony service is active and will persist after a reboot.
Verify the Chrony Configuration
Display the contents of the Chrony configuration file to confirm the configured NTP servers:
- # cat /etc/chrony.conf
Explanation: This file contains the list of NTP servers and other settings, such as access rules and logging options, which are used by Chrony for time synchronization. If necessary, edit this file to customize the NTP servers.
Enable NTP Synchronization with
timedatectlEnable NTP sync through
timedatectl:
- # timedatectl set-ntp true
Explanation: Setting
NTPto true ensures that time synchronization is enabled. This is particularly useful for tasks requiring precise timing, such as logging and authentication.
Verify NTP Synchronization
Confirm that the system is synchronized with an NTP server:
- # timedatectl
Expected Output: The output should show "NTP synchronized: yes," confirming successful time synchronization.
Additional Notes
Chrony:
Chrony provides robust NTP support and is highly suitable for systems with intermittent or unreliable connectivity.
Key Settings in
/etc/chrony.conf:NTP Servers: Defines the list of remote NTP servers for synchronization.
Allow/Deny Rules: Configures which hosts can access the Chrony daemon.
Time Sources: Specifies sources for time data, including local system and remote NTP servers.
Logging: Allows configuration of logging levels and log file locations for monitoring sync activity.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
