Solved

Remote Change Dates on AIX Automation

Posted on 2016-09-14
7
72 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
ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

 

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Local Printing Using Remote Desktop Windows 7 sometimes has issues with printing to a local printer using a Remote Desktop Connection (RDC). The 1st step is to verify that printers are checked on the Local Resources tab of the Remote Desktop C…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

713 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