Configure NTP server for Samba4

Samba4 works smoothly without NTP so this becomes an optional case if you want to configure it but again if you ask me I will ask you to take it as a priority because there are times when I have seen due to gap of time interval between server and client the internet stops working and also the user has to face other sort of problems. The group policies won't work perfectly if the time gap increases more than 5 minutes between the server and client. So it is always recommended to install NTP server once you configure Samba4
These are the basic steps required to configure NTP for Samba4 in Red Hat or CentOS
There are two ways to achieve this either you instal the rpm package or you can download the latest version of NTP from the source site.
It is recommended to use NTP-4.2.6 which is tested by Samba4 developers and works fine.
Follow this link for the source download NTP-4.2.6p5

Configuring through rpm package


On RHEL system you must have an active subscription to RHN or you can configure a local offline repository using which "yum" package manager can install the provided rpm and it's dependencies.
# yum -y install ntp
# vi /etc/ntp.conf
# comment out these lines
# Make sure these lines are present
server # local clock
fudge stratum 12
ntpsigndsocket /usr/local/samba/var/run/ntp_signd/
restrict default mssntp

Once done save and exit and restart the services

# service ntpd restart

To check the used server for ntp

# ntpq -np

Running the NTP daemon as "strace ntpd -n" will keep ntpd in the foreground and allow you to see the files and sockets that it opens and closes.
Now go to the client machine and type this command as administrator

C:\> w32tm /resync

Sending resync command to local computer
The command completed successfully.