Solved

Remote Change Dates on AIX Automation

Posted on 2016-09-14
7
50 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
  • 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

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…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

929 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now