xenopeek wrote:This isn't possible in the way that you suggest. Using sudo, you will have to type the password, unless you reconfigure sudo to not need a password for the ntpdate command for your account. That's a bit more difficult.
Could you let us know what you are trying to do here?
Each time your network interface goes up, ntpdate is run (see the file /etc/network/if-up.d/ntpdate) and uses ntp.ubuntu.com (see the file /etc/default/ntpdate). If you want it to also use pool.ntp.org (though you had better include a country code in that I think), you can just add that in /etc/default/ntpdate.
There are various ways to run system commands automatically without having to the enter a password. Clearly, you do that by running the scripts not from your account but from root's account. But before I write more about that, it would be helpful to understand what you are trying to do
gksudo gedit /etc/rc.local
ntpdate ntp.ubuntu.com pool.ntp.org
Users browsing this forum: No registered users and 2 guests