I'm having a problem here and I was wondering if anyone could help me? I'm putting together a password script. First off, I don't have root access. I have sudo access. Lets say the User ID is Trevor1, the password is H!rry23! and the server name is Linux1234
This is how the script begins
#!/bin/bash
read -p "Enter User ID"= useridname
read -p "Password"= userpasswd
read -p "Enter Server(s)"= servertext && echo $servertext > serverlist
for i in `cat serverlist`
do
echo "$i"
ssh $i sudo /usr/bin/passwd --stdin $useridname | echo -n $userpasswd
cat /dev/null > serverlist
done
Everything goes well until I get to this portion of the script :
ssh $i sudo /usr/bin/passwd --stdin $useridname | echo -n $userpasswd
The the output is:
Linux1234
H!rry23! Enter passphrase for key '/local_home/username/.ssh/id_dsa
After I enter the passphrase key and press enter, the cusor will just sit there forever.
After a long while i'll get this output:
passwd: Authentication information cannot be recovered
What's going wrong? And how can this be fixed