It can be done with scripting, but I don't recommend storing passwords in such a file. Account names yes, passwords no. You don't need to store them in order to manage security like this and storing the passwords is an unecessary security risk. Users can enter new passwords into a field with global storage and your scripts can clear this field after a password change has been implemented.
You can look at the script steps grouped under the accounts header to see what steps you have to work with.