Plesk has a lot of short comings, in my opinion. One of them is they way Plesk stores passwords. I will not go into the best practices for passwords, but instead offer this one-liner that will allow you to change all the FTP passwords for Plesk in one fell swoop. This is particularly useful if you think one or more passwords have been compromised.


# for i in $(mysql -NB psa -uadmin -p`cat /etc/psa/.psa.shadow` -e ‘select login from sys_users;’); do export PSA_PASSWD=”$(openssl rand 6 -base64)”; /usr/local/psa/admin/bin/usermng –set-user-passwd –user=$i; echo “$i: $PSA_PASSWD” >> ftp_passwords; done


If for some odd reason you have a password for a user that is set to NULL, this will not update it. You shouldn’t have any, unless you are editing the psa database directly.

One Response to “Mass Password Change for Plesk FTP Users”
  1. jk says:

    hey, thanks. That was quite helpful.

  2.  
Leave a Reply