KB Article #174107
Change password over FTP or FTPS (UNIX)
Problem
How to change user account password over FTP or FTPS (UNIX)?
Resolution
After logging in as the user, the change password syntax would be:
SITE CHPWD <account_name> <old_password> <new_password>
However, there is a limitation, all the parameters must be base64 encoded.
With this in mind, here is an example:
- <account_name> = test
- <old_password> = SECRET
- <new_password> = SECRET123
1. Encode the parameters
# echo -n test|base64 dGVzdA== # echo -n SECRET|base64 U0VDUkVU # echo -n SECRET123|base64 U0VDUkVUMTIz
2. Login and change password
ftp localhost Connected to localhost. 220 ST 5.x FTP server (SecureTransport 5.x) ready. Name (localhost:root): test 331 Password required for test. Password: 230 Virtual user test logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> quote (command line to send) SITE CHPWD dGVzdA== U0VDUkVU U0VDUkVUMTIz 200 CHPWD command successful. ftp> quit 221 Goodbye.
*NOTE* The examples use native UNIX utilities. Different operating systems or utilities may behave differently.