Hello,
Thanks for visiting RvKmR.blogspot.in .
In this blog, I am going to explain about my script “Reset multiple Linux server password” written in bash. To understand this script you must be familiar with Bash scripting and Linux environment.
Q : I have 100 's Linux server, I need to reset these Linux server password on weekly. I know procedure to reset password of single server i.e. Login in to target server and reset password with utility “passwd”. But here is issue : What if I have 100 's of server ? it is not efficient way to login to each server and the reset password.
Ans : Written an bash script to automate this task. Details are mentioned below. There are some prerequisites needed before running this script. We need know targeted Linux server IP address and current password of server. Create a file “server_details” at same location where is your main script located and write IP address and password like : "<IP>:<old_password>". One line have one server details.
Steps to use this script :
To run this script Initiator server must have booted with Linux OS or OS must have bash installed. Run this script as bellow :
RvKmR@RvKmR-Vostro-220s-Series ~/Reset_password $ ls
pass_reset.sh server_details
RvKmR@RvKmR-Vostro-220s-Series ~/Reset_password $
RvKmR@RvKmR-Vostro-220s-Series ~/Reset_password $ bash pass_reset.sh
This script will use file server_details and login to each server at default ssh port 22 and reset password. After successfully running of this script, you will find updated password details in file “updated_server_details” at same location where is your script.
You can find script at below at git hub: Reset Multiple Linux server Password
For more help please comment it.
Thanks!!
Thanks for visiting RvKmR.blogspot.in .
In this blog, I am going to explain about my script “Reset multiple Linux server password” written in bash. To understand this script you must be familiar with Bash scripting and Linux environment.
Q : I have 100 's Linux server, I need to reset these Linux server password on weekly. I know procedure to reset password of single server i.e. Login in to target server and reset password with utility “passwd”. But here is issue : What if I have 100 's of server ? it is not efficient way to login to each server and the reset password.
Ans : Written an bash script to automate this task. Details are mentioned below. There are some prerequisites needed before running this script. We need know targeted Linux server IP address and current password of server. Create a file “server_details” at same location where is your main script located and write IP address and password like : "<IP>:<old_password>". One line have one server details.
Steps to use this script :
To run this script Initiator server must have booted with Linux OS or OS must have bash installed. Run this script as bellow :
RvKmR@RvKmR-Vostro-220s-Series ~/Reset_password $ ls
pass_reset.sh server_details
RvKmR@RvKmR-Vostro-220s-Series ~/Reset_password $
RvKmR@RvKmR-Vostro-220s-Series ~/Reset_password $ bash pass_reset.sh
This script will use file server_details and login to each server at default ssh port 22 and reset password. After successfully running of this script, you will find updated password details in file “updated_server_details” at same location where is your script.
You can find script at below at git hub: Reset Multiple Linux server Password
For more help please comment it.
Thanks!!
Comments
Post a Comment