Basically the title. My friend provided me a script to batch change RHEL passwords via Powershell and PuTTY, but the new password I entered doesn't work when I try to log in. I think the issue is that it doesn't escape one of the special characters that's in the new password, but I can't figure out what the new password would have been.
The "new password" I used was similar to this: a1b2c3d"4e5f6g7
I attempted to replace the secure strings for regular strings, or use telnet instead of SSH with a packet capture to determine what exactly is being sent, but none of that has worked thus far.
System.Management.Automation.PSCredential -argumentlist "root",$newrootPassword $newrootPassword2 = Read-Host "Retype new root password" -AsSecureString $newrootCredential2 = new-object -typename System.Management.Automation.PSCredential -argumentlist "root",$newrootPassword2 putty.exe -ssh -pw $oldrootCredential.GetNetworkCredential().Password root@$_ echo y | plink.exe -ssh -v -pw $oldrootCredential.GetNetworkCredential().Password root@$_ "echo root:'$newrootPassword' | chpasswd" 2>&1
I expected the new password to be a1b2c3d"4e5f6g7; however, this does not work upon login.