Mass update of passwords

Advertisement

EH
Joined:
Posts:
1
Location:
Europa

Mass update of passwords

Hello

periodically, i need to change the password for logins to a large group of servers - all with SAME user / password combination.
This takes usually an hour or longer to do.

Would be great if those passwords could be changed in automated way with some "batch update" feature... Ideally with a filter on a certain subset of remote hosts.

Thx alot in advance
EH

Reply with quote

Advertisement

virenmody
Joined:
Posts:
2
Location:
Chicago

Mass Update of Password - some help needed

I read Martin's reply above and read the two links, but as I'm unfamiliar working the commandline for WinSCP, I wanted to ask for some guidance.

Based on what I read from the two links provided:
1) For all sites, all my passwords are the same and I have them saved. Would this be the command I use to update my saved password to "mypassword" for all sites in a folder called "primary"?
winscp.exe /batchsettings primary/* PasswordPlain=mypassword
2) Where/how do I run this command? It doesn't sound right to run this from Windows command prompt because I would have to login into WinSCP first right?
3) If I want to change it for all sites, would I replace "primary/*" in the above command with just "*"?
4) I read that WinSCP will replace the option "PasswordPlain" with option "Password" on first start up. Is that guaranteed? Is there a way I can use the above command with option "Password" instead of "PasswordPlain"? If so how can I do this?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Mass Update of Password - some help needed

virenmody wrote:

1) For all sites, all my passwords are the same and I have them saved. Would this be the command I use to update my saved password to "mypassword" for all sites in a folder called "primary"?
winscp.exe /batchsettings primary/* PasswordPlain=mypassword
Correct.

2) Where/how do I run this command? It doesn't sound right to run this from Windows command prompt because I would have to login into WinSCP first right?
Yes, from Windows command prompt.
No, you would not have to login anywhere (and note that you do not login to WinSCP, you login to your server[s]).

3) If I want to change it for all sites, would I replace "primary/*" in the above command with just "*"?
Yes.

4) I read that WinSCP will replace the option "PasswordPlain" with option "Password" on first start up. Is that guaranteed?
Yes. Though that applies only if you manually set the PasswordPlain in WinSCP configuration storage (registry or INI file). When you use WinSCP command-line, the conversion is immediate.

Is there a way I can use the above command with option "Password" instead of "PasswordPlain"? If so how can I do this?
No. Because Password "encryption" uses host and username as a key. So every site will have a different value of Password.

Reply with quote

Advertisement

chusgoru
Guest

Passwords are not modified correctly in batch task

Hi,

I have read all thread from the beginning. I did this command to update passwords in all my sites:
winscp.exe /batchsettings OPT-BESP/* Password=mypassword
CMD windows pops up and all sites were changed.

However, when login in one site, winscp prompts me to enter correct password. It seems passwords were not updated correctly. I also tried using PasswordPlane, but nothing was changed since that parameter is not included in site config.

Why isn't password updated correctly?

Reply with quote

martin
Site Admin
martin avatar

Re: Passwords are not modified correctly in batch task

chusgoru wrote:

I also tried using PasswordPlane, but nothing was changed since that parameter is not included in site config.
It's PasswordPlain.

Reply with quote

Advertisement

You can post new topics in this forum