Solved

Remote Change Dates on AIX Automation

Posted on 2016-09-14
7
42 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Remote Desktop Connections allow you to control remote host machines via the magic of the Internet and RDP (Remote Desktop Protocol). For the purposes of this article we will assume you are connecting from your home PC or laptop to a remote offic…
Remote Desktop Shadowing often has a lot of benefits. When helping end users determine problems, it is much easier to see what is going on, what is being slecected and what is being clicked on. While the industry has many products to help with this,…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

760 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

19 Experts available now in Live!

Get 1:1 Help Now