[SUCESS!] NTP Configuration [Was: Re: A successful Samba 4 deployment]

Adam Tauno Williams awilliam at whitemice.org
Wed Dec 8 10:02:59 MST 2010


On Mon, 2010-12-06 at 10:27 -0500, Adam Tauno Williams wrote:
> On Fri, 2010-12-03 at 19:29 +0300, Matthieu Patou wrote: 
> > > Running "strace -o file ntpd -dddd -n" and looking at stdout or the
> > > trace information shows no attempt by ntpd to open a socket at the
> > > specified location.
> > > Hmmmm.....
> > Show us the version of your ntp, and ntp.conf
> ntpd - NTP daemon program - Ver. 4.2.6p2
> server 127.127.1.0 # local clock (LCL)
> server 192.168.1.9 # A functioning NTP server on the test network
> fudge  127.127.1.0 stratum 10 # LCL is unsynchronized
> driftfile /var/lib/ntp/drift/ntp.drift # path for drift file
> logfile   /var/log/ntp # alternate log file
> keys /etc/ntp.keys # path for keys file
> trustedkey 1 # define trusted keys
> requestkey 1 # key (7) for accessing server variables
> # controlkey 15 # key (6) for accessing server variables
> #restrict mynet mssntp
> ntpsigndsocket /opt/ad/samba4/var/run/ntp_signd/socket
> restrict default mssntp

The correct configuration is:

ntpsigndsocket /opt/ad/samba4/var/run/ntp_signd/socket
restrict default mssntp

NTP apparently puts the "socket" on the end of the path automatically
[Wow, that is as intuitive as ...]

Now if I "w32m /resync /rediscover" the Windows 7 client responds
Sending resync command to local computer
The command completed successfully.

And at least it *appears* to work.  On the DC I see NTP and Samba4
having some type of exchange.
<CLIP>
select(25, [16 17 18 19 20 21 22 23 24], NULL, NULL, {0, 0}) = 1 (in
[21], left {0, 0})
recvmsg(21, {msg_name(-1734344)={...},
msg_iov(17832102453714092032)=0x14ffe5894c, msg_controllen=120259084288,
msg_control=0x848, msg_flags=MSG_DONTROUTE|MSG_PROXY}, 0) = 68
recvmsg(21, 0xffe5891c, 0)              = -1 EAGAIN (Resource
temporarily unavailable)
clock_gettime(CLOCK_REALTIME, {1291827449, 637483079}) = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 4
connect(4, {sa_family=AF_FILE,
path="/opt/ad/samba4/var/run/ntp_signd//socket"}, 110) = 0
write(4, "\0\0\0@", 4)                  = 4
write(4, "\0\0\0\0\0\0\0\0\1\0\0\0P\4\0\0\34\v\21\360\0\0\0\0\0\0002\337
\177\177\1\0"..., 64) = 64
read(4, "\0\0\0P", 4)                   = 4
read(4, "\0\0\0\0\0\0\0\3\0\0\1\0\34\v\21\360\0\0\0\0\0\0002\337\177\177
\1\0\320\2527c"..., 80) = 80
sendto(21, "\34\v\21\360\0\0\0\0\0\0002\337\177\177\1\0\320\2527c>\360
\220\303\320\2527\201\3478 \330"..., 68, 0, {sa_family=AF_INET,
sin_port=htons(123), sin_addr=inet_addr("10.66.77.102")}, 16) = 68
close(4)    
</CLIP>

ntp-4.2.6p2-38.1.i586 [1]
4.0.0alpha14-GIT-03b078c
openSUSE 11.3

See also <https://bugzilla.novell.com/show_bug.cgi?id=657194>

[1] Repo URL is
<http://download.opensuse.org/repositories/home:/namtrac/openSUSE_11.3/>



More information about the samba-technical mailing list