password change problem using API

I have created a user using the command line script create-user.pl. Everything gets setup correctly, I can log into usermin, check email etc… everything looks fine.

I have also written a helpdesk app that uses the remote API to allow my techs to change a users password. Unfortunately this works hit or miss. Here is what I have discovered.

When I first create the user I get an entry in the file /etc/webmin/virtual-server/plainpass/1962636449326

[code:1]myuser@domain.com encrypted=DUMN5j31yhkiY
myuser@domain.com=green[/code:1]

If I use webmin to change the password it gets converted to resemble the following.

[code:1]myuser@domain.com encrypted=$1$KTqri6eI$eqGn3w1RHnFxBcSlPT.Ky1
myuser@domain.com=green[/code:1]

The problem comes with the remote API with the command modify-user. If I use the remote API to change the password and th password is in the first format it messes up and the password no longer works. The file shows the correct plaintext password but the user cannot log in. If it is in the second format everything works fine.

So I have narrowed this down to problems with the new users only that were created with the command line create-user.pl script. I have not tested this with users created through virtualmin.

Look-a-like-a-bug. If you file it in the tracker, Jamie will probably get it fixed for the next release in a few days.