Sample Header Ad - 728x90

Automating password changes

1 vote
1 answer
309 views
I'm trying to automate password changes on 36+ servers b/c doing it the manual way to ridiculous and annoying. Basically, I can run a 'grep -ir password' on 1 of my host linux servers and see how many servers respond to the query. I can then go to each one of them and cd into the proper directories and locations and run an update as ':1+$s1password+newpassword+g ' and then save the update. However, this is very tedious and I have to multiple it by how many directories responded to the query and then times that by 36+ servers. So, can someone please assist if you know how to accomplish my inquire? The only thing I can think of but I don't know if it's right would be to do something like this... grep -ir password | vi *directory/file | :1+$s1password+newpassword+g && :wq OR MAYBE, I should be thinking of this as a bash script that needs to be created Again, your solutions will be much appreciated, thank you! Regards, CG
Asked by user477924 (11 rep)
Jun 17, 2021, 10:04 PM
Last activity: Jun 17, 2021, 10:27 PM