Topic "How to automate password change using WinSCP"

Author Message
Pubudu
[View user's profile]

Joined: 2016-06-03
Posts: 1
Location: USA
Hi I'm new to WinSCP, using version 5.7.7.0 and I was able to use .Net & Com library to do basic SFTP operations such as upload, download, make directory, list directory.

I'm not sure how I can automate password change.

I was trying to use session.ExecuteCommand("passwd oldpassword newpassword newpassword"); and got an error as below.

Command 'passwd oldpassword newpassword newpassword'
failed with return code 6 and error message
usage:
passwd [-r files | -r nis | -r nisplus | -r ldap] [name]
passwd [-r files] [-egh] [name]
passwd [-r files] -sa

Can some one please explain me how I can do the password change using ExecuteCommand or terminal ssh scripts?

Thanks
Pubudu
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
The passwd is explicitly made not to be automatable. For a good reason.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License