Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 

GAIA - Easy execute CLI commands on all gateways simultaneously

HeikoAnkenbrand
Champion Champion
Champion

Now you can use the new command "gw_mbash" and "g_mclish" to execute bash or clish commands on all gateway simultaneously from the management server. All you have to do is copy and paste the above lines to the management server. After that you have two new commands on the management server. Here you can now centrally execute simple commands on all gateways which are connected via SIC with the management.

escc123.JPG

Attention!

You can quickly destroy you

...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free

Disclaimer: Check Point does not provide maintenance services or technical or customer support for third party content provided on this Site, including in CheckMates Toolbox. See also our Third Party Software Disclaimer.




(1)
64 Replies

Maria_Pologova
Collaborator

It does, we discussed it a few posts above. 🙂

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

marko2921
Explorer

Hi  @HeikoAnkenbrand,

I run at one issue runing the gw_mclish +command on SMB.

First I edited this line in gw_mclish: if $CPDIR/bin/cprid_util getarch -server $line |grep -i "gaia" > /dev/null; (added -i for grep option, without -i it didn't work)

When I try to execute command "add user test123 type admin password 1234 permission RW" with gw_mclish on SMB r80.20 device from SMS r81.10 there is this error:

Unexpected error: attempt to index global 'cgilua' (a nil value).


Here

...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Fernando_Lopez
Contributor

hi Heiko!

Loved your script; really useful.

Is there any way you could add a real-time read for the command's output?

Say I ran a CPinfo; is there a possibility to read from stdout in real time so i can watch live what the command is doing over the GWs?

That would be awesome

Thanks!

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

Fernando_Lopez
Contributor

Oh, and 2 more things, if I may ask:

1. Could there be a way to pipe or send stdout to file inside the GW?

if, say, i run "gw_mclish show configuration > config.txt", the file config.txt is created in the current mgmt dir.

2. is there a way for the gw_m commands to understand bash variables?
E.G.: $USER variable
it would be really awesome if i could just do "gw_mbash cd /home/$USER/" 

Thats about it, thank you!!

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos

sidlab1584
Explorer

Hi HeikoAnkenbrand,

Pretty handy script !. I want to use this to change admin passwords and expert passwords across all gateways , when I try to run this I cannot input any values , any suggestions if I can use this script for this use-case?. 

;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos