[KLUG Members] ntpd and samba

Peter Buxton members@kalamazoolinux.org
Mon, 17 Feb 2003 22:00:00 -0500


Hmm, did I send the first half already? No, apparently not. I seemed to
have misplaced this in my drafts folder. Oh, well.

On Mon, Feb 10, 2003 at 12:22:41PM -0500, Peter Buxton wrote:

> You should probably use the w32tm.exe lines anyway, which is why I'm trying
> to find them again. I might have used "net time /setsntp:time", but I don't
> *remember* doing that...

Well, it turns out that the command:

net time /setsntp:<ntpserverhere>

while running as local Administrator will set the Windows Service SNTP
client. I did find this on some NTP FAQ's, but none mentioned Admin
privs. I made a new DNS A record for the server just for NTP service;
that way I control the time service merely by rewriting the zone file.

In other news, Bob Brown asked for a sample ntp.conf file, here it is.
Note how it comes with NO explanations at all! Just like the package!

Seriously, everything between the conf file name and the "lines starting
'server'" is in the Debian stock ntp.conf file. I added the stuff below
it:


# /etc/ntp.conf, configuration for ntpd

# ntpd will use syslog() if logfile is not defined
#logfile /var/log/ntpd

driftfile /var/lib/ntp/ntp.drift
statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

### lines starting 'server' are auto generated,
### use dpkg-reconfigure to modify those lines.

# the rest of our hosts are clients, not peers
restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap

# server IP# points us to an ntp server. Loopback IPs stand for 
# different models of reference clocks. The following loopback address 
# stands for the internal PC clock. I use 'rdate -s time-a.nist.gov' to 
# set the time in /etc/crontab
server 127.127.1.1

# Not necessary for SNTP clients, but can't hurt
broadcast 192.168.1.255

# not public, not peered, no authentication
# authenticate no



-- 
I wish our noses snapped together like LEGOs. -- pbb