Setting the time on a dial-up

keith_jones at non.hp.com keith_jones at non.hp.com
Wed Jan 26 11:26:16 GMT 2000


Dom,

One option to avoid the necessity of writing a wrapper is to make 
'ntpdate' setuid and only readable/executable by certain users:

1. Add a new 'ntpdate' group to '/etc/group', e.g.:
 ntpdate 2000 <your user name here>

2. Change the file ownership and permissions of 'ntpdate':
 chown root.ntpdate /usr/sbin/ntpdate
 chmod 4750 /usr/sbin/ntpdate

Someone feel free to correct me if this is wrong, I've only just woken up 
;)

Keith

-----Original Message-----
From: dom at myrddin.demon.co.uk [mailto:dom at myrddin.demon.co.uk]
Sent: 25 January 2000 07:35
To: nik at freebsd.org
Cc: ben at scientia.demon.co.uk; mike at urgle.com;
freebsd-users at uk.freebsd.org; dom at myrddin.demon.co.uk
Subject: Re: Setting the time on a dial-up


On Mon, Jan 24, 2000 at 10:27:34PM +0000, Nik Clayton wrote:
>    On FreeBSD machine, run "ntpdate ntp.foo.bar" out of the ppp linkup
>    file, every time the link comes up, to make sure the local time is
>    correct (or close to).

This raises an interesting point.  Really, one needs to run ntpdate as
root.  However, normally, I use ppp as myself:

myrddin:~> alias demon
demon='ppp -background demon ; ping demon-du'

And I couldn't find any way to get ntpdate running as root without a
small setuid wrapper?  Am I barking up the wrong tree?

-Dom


------ FreeBSD UK User's Group  -  Mailing List ------
http://listserver.uk.freebsd.org/mailman/listinfo/freebsd-users






More information about the Ukfreebsd mailing list