Remote Change Dates on AIX Automation

Posted on 2016-09-14
Last Modified: 2016-09-15
Hi All. I am looking for a way to either use a script or some sort of automation to change dates on multiple AIX Servers all at once. At first, I have been creating a NTP Server but it is becoming more of a headache than anything else. My PC is a windows machine (windows 7). Any Advice?
Question by:D T
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 10

Expert Comment

by:Carlos Ijalba
ID: 41798742
The best way to update AIX servers is via an NTP server:

1.- set it up in one machine out to the internet with syncronization onto the servers on the pool, if this machine can be a hardware network appliance, better, otherwise do it with an AIX machine, do not use a windows server for NTP.

2.- set up all your AIX to use your internal NTP server as thier NTP server.

Author Comment

by:D T
ID: 41799442
Hey, Thanks for the suggestion but I really need to do it via a script because in the future, we would sometimes want a few aix systems to not get the time sync and some to get it. Secondly, I wouldn't be using it to get the correct date and time, I would be alternating the days and time depending on the needs. I see that aix has a max offset time of 1000 which is not enough  for my needs, thus the need for a script to do it instead of NTP Server.
LVL 10

Expert Comment

by:Carlos Ijalba
ID: 41799927
In that case, use the command:

date mmddHHMM

Open in new window

So to put a system at todays date (15/09/2016) at 15:55

date 09151555

Open in new window

And you can issue it remotely via ssh commands.
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI


Author Comment

by:D T
ID: 41800098
Is there any way I can automate that process, for example, what programming language should I use to execute on a windows machine(with probably changes to the variables that has the times) that would execute to change the date on multiple AIX machines.
LVL 10

Expert Comment

by:Carlos Ijalba
ID: 41800194
Well, frankly i would suggest To use windows 10 with the anniversary update, which gives you access to enable the Ubuntu bash shell, then directly execute a bash shell from the Unix/Linux world on you windows and include SSH commands to the remote systems.

Author Comment

by:D T
ID: 41800251
For a solution of windows 7, any other suggestions?
LVL 10

Accepted Solution

Carlos Ijalba earned 500 total points
ID: 41800452
You have to use a SSH client for windows, that way you can send remote commands in ksh o bash, that can be sent from a powershell or batch in windows.

One such client is openssh for windows:

install it, and try to send a date command to an AIX server:

Executing remote commands:

ssh $HOST "uname -a"                        <-- execute cmd in remote server as actual user

ssh root@$HOST 'uname -a'                  <-- exectute cmd in remote server as root

Executing remote scripts:

ssh $HOST '/PATH/'                  <-- execute script in remote server

ssh $HOST 'bash -s' <            <-- execute local script in remote server

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Like many organizations, your foray into cloud computing may have started with an ancillary or security service, like email spam and virus protection. For some, the first or second step into the cloud was moving email off-premise. For others, a clou…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question