When working with Windows FTP clients connecting to Linux servers, you'll quickly notice there's no built-in FTP command to change user passwords. This is because FTP (File Transfer Protocol) was designed for file transfers, not account management.
Here are three reliable approaches to modify FTP user passwords when connected via command line:
1. Using SSH for Remote Password Change
If you have SSH access to the Linux server:
ssh username@serverhostname
passwd
This prompts you to enter and confirm the new password.
2. Pure FTPd Specific Command
For Pure-FTPd servers, use this command:
pure-pw passwd username -m
You'll need to update the database afterward:
pure-pw mkdb
3. Vsftpd Server Solution
For Vsftpd servers, modify the password through the system account:
sudo usermod --password $(echo "newpassword" | openssl passwd -1 -stdin) username
For scripting purposes, here's a Bash script example:
#!/bin/bash
USER="ftpuser"
NEWPASS="newSecurePassword123"
ssh $USER@ftpserver "echo -e '$NEWPASS\n$NEWPASS' | passwd $USER"
- Always use SFTP/SSH instead of FTP when possible
- Passwords should be at least 12 characters with mixed character types
- Consider setting up SSH key authentication instead of password logins
- Regularly rotate FTP passwords for sensitive accounts
If password changes aren't taking effect:
- Check if the FTP server is running in chroot environment
- Verify the user has proper permissions to change their password
- Restart the FTP service after password changes (sudo systemctl restart vsftpd)
- Check server logs (/var/log/messages or /var/log/syslog)
When administering a Linux server from a Windows machine, you might encounter the need to change an FTP user's password. The standard Windows FTP client doesn't provide a native command for password changes, as this operation is typically handled at the system level rather than within the FTP protocol itself.
The most secure method is to use SSH to access your Linux server and modify the password directly:
ssh username@your_linux_server passwd ftp_username
You'll be prompted to enter and confirm the new password. This updates the system authentication for the user.
Using pure-ftpd (if installed)
For systems using pure-ftpd, you can use:
pure-pw passwd username
Using vsftpd
For vsftpd installations, passwords are managed through system users:
sudo passwd ftpuser
1. PowerShell Remoting
If you have SSH configured on Windows 10/11:
Enter-PSSession -HostName your_server -UserName admin passwd ftp_user
2. Plink (PuTTY command-line)
Using plink.exe from PuTTY suite:
plink.exe -ssh user@host -pw oldpassword "echo 'newpassword\nnewpassword' | passwd username"
- Always use SSH instead of telnet for remote administration
- Consider using SSH keys instead of passwords where possible
- For production systems, implement password rotation policies
If password changes don't reflect in FTP:
- Check if the FTP server uses virtual users
- Verify PAM configuration on Linux
- Restart the FTP service:
sudo systemctl restart vsftpd