📘 Uncategorized

Bash Script For Changing Root Password Of A Server

AD admin3 · 📅 19 August 2024 · ⏱ 1 min read
✍️ Need help with this assignment? Get expert quotes in minutes — free to submit. ✍️ Get Writing Help FREE

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.

The post Bash Script For Changing Root Password Of A Server first appeared on Scholarly Guider.

Plagiarism Free Assignment Help

Expert Help With This Assignment — On Your Terms

  • Native UK, USA & Australia writers
  • 100% Plagiarism-Free — Turnitin report included
  • Deadline from 3 hours
  • Unlimited free revisions
  • Free to submit — compare quotes
AD
admin3
Academic Expert · NursingExpert

Expert academic writer and education specialist helping students in the UK, USA, and Australia achieve their best results.

Need help with your own assignment?

Our expert writers can help you apply everything you've just read — to your actual assignment, brief, and marking criteria.

Get Expert Help Now →
📝 Free Submission — No Card Required

Need Help With This Assignment?

Our verified experts deliver 100% original, plagiarism-free work to your exact brief and marking criteria. Submit free — compare quotes — choose your expert.

Write My Assignment FREE Get A Free Quote →

No credit card · No commitment · First quote in minutes