Create a bash script for changing root password for list of servers Input :- read list of servers from a file, take password for user1, root password & new r
Create a bash script for changing root password for list of servers
Input :- read list of servers from a file, take password for user1, root password & new root password.
The script should loop through all the servers in the input file
login to server as user1
Then log as root (su -)
should take password directly from the inital input
Echo " logged in as root and display server name"
Change root password with new passsword
Check if password change was successful and display output (success or failure)
sample change on one server:-
ssh user1@server01
Password of user1
[user1@server01]$su –
root password(this should directly take from input)
[root@server01 ~]# passwd
Changing password for user root.
New password:
Retype new password:
passwd: password successfully changed for root
passwd: all authentication tokens updated successfully.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.