Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Nov 2000 13:00:12 -0800
From:      "Crist J . Clark" <cjclark@reflexnet.net>
To:        Lowell Gilbert <lowell@lowellg.ne.mediaone.net>, me@mine.com
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: ntpdate and date fail to change clock by more than 1 second...
Message-ID:  <20001125130012.X12190@149.211.6.64.reflexcom.com>
In-Reply-To: <44n1eoqeko.fsf@lowellg.ne.mediaone.net>; from lowell@lowellg.ne.mediaone.net on Sat, Nov 25, 2000 at 10:03:19AM -0500
References:  <8vml5e$moe@dispatch.concentric.net> <44n1eoqeko.fsf@lowellg.ne.mediaone.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 25, 2000 at 10:03:19AM -0500, Lowell Gilbert wrote:
> "news.cncdsl.com" <me@mine.com> writes:
> 
> > I have a fresh cvsup, make world and kernel from 4.2-S.
> > 
> > Whenever I try to change the date using 'ntpdate' or even 'date' it doesn't
> > change my clock although the output seems ok:
> > 
> > mls2:~ -12:56:45- # ntpdate tick.cs.unlv.edu
> > 23 Nov 12:56:48 ntpdate[6352]: step time server 131.216.16.9
> > offset -6859.012166 sec
> > 
> > At the same time, /var/log/messages shows the following line:
> > 
> > Time adjustment clamped to -1 second
> > 
> > The only think new I've noticed while booting since this box was installed
> > is:
> > 
> > Raising kernel security level
> > kern.securelevel: -1 -> 2
> > 
> > Are these related? How do I fix this?
> 
> Yes, they are related.  In elevated securelevels, you are not allowed
> to change the system clock (reasons left as exercise for the reader).
> Change your rc.conf to not elevate your securelevel, or reboot every
> time you want to adjust your clock (and do the adjustment at startup;
> if you enable the automatic boot-time ntpdate (ntpdate_enable), this
> should occur *before* the securelevel is raised.

You can adjust the clock, just not at greater than one second
increments. From init(8),

     2     Highly secure mode - ...

           In addition, kernel time changes are restricted to less than or
           equal to one second.  Attempts to change the time by more than this
           will log the message ``Time adjustment clamped to +1 second''.

Run an ntpdate during boot before upping the securelevel. Provided you
don't gain/lose more than a second between updates once you are up,
you will be fine running at a securelevel and doing NTP updates.
-- 
Crist J. Clark                           cjclark@alum.mit.edu


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001125130012.X12190>