I want to replace a value of a string in a file on all the remote systems. The file is /opt/adapter/Adapter/snmp/conf/snmpd.conf and the parameter to be replaces if "rocommunity" for which current value is "public" and wish to change it to "sp1der".
i did trying it through sed, but not sure how do i do it all systems. Also there are other strings in file which has a value as "public" which should not be replaced.
Please advice.
Last edited by DukeNuke2; 03-28-2012 at 04:23 AM..
Bases on the give code, i have written the script. is this correct?
Could you please confirm.
-Siddhesh
---------- Post updated at 09:23 PM ---------- Previous update was at 08:31 PM ----------
---------- Post updated at 10:27 PM ---------- Previous update was at 09:23 PM ----------
Hello All,
The above mentioned script worked well. but i have few other requirements on this.
1.Our script should take the IP of servers from a text file (we already have the solution for this in above script)customer have all together 36 nodes.
2.Script should be able to copy the script file on all the other nodes, taking IP from the text file.(ip_list file)
3.rocommunity should be prompted, so that user can input their string, shouldn't be hardcoded. In the above script it directly replaces with sed.
4.Log should be generated out of this, so that they can track it for any errors. (We can include echo commands to get this)
5. And at the end this script must have ability to perform the start/stop/restart from the single server.
Here is the basic code i have written till now which covers point 1, 4 and 5 points. please help
Please advice as this is on priority for me. Thanks in advance.
-Siddhesh
---------- Post updated at 11:23 PM ---------- Previous update was at 10:27 PM ----------
Guys any idea on this. Please reply...
-Siddhesh
Last edited by Siddheshk; 03-28-2012 at 02:31 PM..
I am trying to cat on a file located on remote server and assign it to remote variable.
I have both local and remote variables. Running below script from local. test.sh
J_NAME=XXX2
J_IP=XXX
ssh $J_IP "ps auxw |grep java | grep -v grep |grep $J_NAME | awk '{print ... (2 Replies)
Iam trying to compare two file systems on two hosts basically to check them to be in sync
I dont have rsync so trying to use diff
Let me know how to do it....
Thanks (3 Replies)
I have been wondering how do Systems Administrators do the jump into Systems Engineering? Is it only a matter of time and experience or could I actually help myself get there?
Opinions? Books I could read?
Thanks a lot for your help! (0 Replies)
Hi folks
Howto do quick remote health check for SAP systems on UNIX commandline? To see if a SAP system is down or in maintenace mode (no login).
I am searching something like "tnsping"/Oracle for SAP systems. (2 Replies)
I am currently using Samba to access remote Unix file systems from Windows. However, it is slow, and I presume insecure in the sense that file contents are transmitted unencrypted. I also wonder if passwords are transmitted in plain text in this protocol or not. For these reasons I am looking for... (2 Replies)
Hello guys,
I am new in Unix world.
I would like know, how Can I check which type of file system (GPFS, JFS) is on the AIX server. I have AIX 5.1.
Could you anyone advice me?
Thanks. (4 Replies)
Hello,
Pls i need to copy some data from AIX Unix 4.3 to a SCO Openserve 5.0.5 using rcp command. But i keep on having permission error. WHAT IS THE SOLTION OR WHAT COMMAND CAN I USE AGAIN (4 Replies)
I need to update a file that is on 50 different systems at once. In case of planned network outages I would like to overwrite or lock a monitoring script so that it doesn't send notifications.
I thought of using a script that ftp 's the updated file to all 50 systems, and then overwrites the... (11 Replies)