- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- NTP Config Changes
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2006 09:11 PM
05-01-2006 09:11 PM
I want to change the the NTP server location on all my linux server's
Is there a way I can do it from a script. ( I dont want to login in each box and then edit the file and restart NTP)
Thanks
Vipul
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2006 10:27 PM
05-01-2006 10:27 PM
Re: NTP Config Changes
- distribute updated ntp.conf using scp
- run "service ntpd restart" using ssh
Rgds,
Vitaly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2006 11:01 PM
05-01-2006 11:01 PM
Re: NTP Config Changes
Can i use some kind of script that will read an tst file and then ssh to each box and then ask whether i want to copy ntp conf file and if i say yes it copies. That is what I am looking for dont wanna login to 100 of server's
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 01:09 AM
05-02-2006 01:09 AM
Solutionfor IP in `seq 254`; do
echo "192.168.0.$IP: Do you want to transfer the file to this host?"
read OPTION
if [ $OPTION = yes ]; then
scp $1 192.168.0.$IP:$2
# service
else
echo "Skipping host 192.168.0.$IP"
fi
In this example, you will transfer a test file (first argument) to all hosts in the network 192.168.0. You need to confirm the transfer, and the location is the second argument, use it like this:
transfer_file.bash /tmp/testfile /etc
To transfer /tmp/testfile to the /etc directory. Anyway, you need to login to all hosts unless you have configured public keys without authentication.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 01:52 AM
05-02-2006 01:52 AM
Re: NTP Config Changes
I would make one script on one server, test it and distribute it with ssh or rsync using ssh.
Then issue a ssh hostname "service ntpd restart" from a central server.
Centralized ssh password free access needs to be in place prior to this.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 09:39 AM
05-02-2006 09:39 AM
Re: NTP Config Changes
that you would use cfengine for. It could
do the whole distribution and restart for
you.
Failing that scp/ssh or rsync as suggested
are also appropriate.
I expect this would be your NTP server that
the address is changing for. Make sure
you don't replace its config file.
I use a standard ntp.conf file for all servers
that support the includefile directive.
The included files specifies the servers.
You will need to distribute the file to all
the clients/
If you have keys setup you can use ntpdc
to reconfigure the running clients.
Otherwise you will need to restart the
clients using ssh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 10:17 PM
05-02-2006 10:17 PM
Re: NTP Config Changes
Thanks fir the info. As I need to login to every box will look at setting ssh keys and then use a script to reduce the manual task for next time.
Thanks
Vipul