Solved

Remote Change Dates on AIX Automation

Posted on 2016-09-14
7
85 Views
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?
0
Comment
Question by:D T
[X]
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
7 Comments
 
LVL 9

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 ntp.org 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.
0
 

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.
0
 
LVL 9

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.
0
Independent Software Vendors: 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!

 

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.
0
 
LVL 9

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.
0
 

Author Comment

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

Accepted Solution

by:
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:

https://sourceforge.net/projects/sshwindows/

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/script.sh'                  <-- execute script in remote server

ssh $HOST 'bash -s' < local_script.sh            <-- execute local script in remote server
0

Featured Post

Industry Leaders: 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

Suggested Solutions

Haven’t we all been there – Mom (or Grandma) needs help on her computer, so calls her IT son (or grandson) for help.  Wouldn’t it be so much easier to just remotely connect to her computer and fix the thing rather than trying to go through it on the…
Let’s list some of the technologies that enable smooth teleworking. 
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

738 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