initial password change problem

I have a domain that I created users using the command line script using the exact format from the documentation.

create-user.pl --domain foo.com --user jimmy --pass smeg --quota 1024 --real "Jimmy Smith"

It created users and added them to the correct plainpass file that resemble this:

myuser@domain.com encrypted=DUMN5j31yhkiY
myuser@domain.com=green

The shadow password file has the same password hash.

I have another script that will change the password using the modify-user.pl command line script. When I run it the password appears to change because the plainpass file has the following:

myuser@domain.com encrypted=$1$KTqri6eI$eqGn3w1RHnFxBcSlPT.Ky1
myuser@domain.com=green

The shadow file also has this new password hash but the user is unable to log in. If I log in as the domain owner and change this password everything works fine aftert that. The modify-user.pl script works. It is only a problem the first time the user password is changed using the script.

Please not that the modify-user script is being run from the Remote API if that makes a difference.

Status: 
Closed (fixed)