Ian Drake, IT, SE Dunbartonshire wrote:

> not on my system :- 
> [anadin@wzc /]$ ntpdate ntp.pipex.net
> bash: ntpdate: command not found
> [anadin@wzc /]$ su
> Password:
> [root@wzc /]# ntpdate ntp.pipex.net
> 18 Apr 14:05:01 ntpdate[14242]: adjust time server 158.43.128.33 offset
> 0.173333 sec
> [root@wzc /]#
> 
> and here's why. As there is no point to a user running ntpdate, this and
> other non-user programs live in /usr/sbin and not in the path of a normal
> user, they are however in the path of root.
> 
> Doesn't everyone run there system this way?

I use a script called set_time with the line

su1 /usr/local/bin/ntpdate ntp.demon.co.uk ntp1.demon.co.uk ntp2.demon.co.uk

and at the end of my /etc/su1.priv I add

allow todd prefix /usr/local/bin/ntpdate

under the section

ask never

> 

I've always found su1 easier to configure than sudo.

cheers

Lawrence

--------------------------------------------------------------------
http://www.lug.org.uk                   http://www.linuxportal.co.uk
http://www.linuxjob.co.uk               http://www.linuxshop.co.uk
--------------------------------------------------------------------

Reply via email to