Users Passwords after Restore

Why can't I access user's passwords after I restore a backup to a new system? This normally wasn't an issue except I removed all users .usermin folder from their home directory because I changed the usermin user defaults and wanted those settings to be applied globally. I don't have anyone but domain administrators using usermin to manage their user's spam folders etc, and they user the 'Login to Usermin' button but now when we try to click that button it asks for the imap password since I removed all the .usermin folders. Is there anything I can do?

Status: 
Active

Comments

The IMAP passwords are stored in the .usermin folders - if you deleted those, then the passwords are lost.

Do you still have a backup of those directories?

I do. Where in the .usermin folder are the passwords stored?

I found that in the inbox.imap file. Why doesn't the 'Show Password' link show after restoring them?

The "Show Password" link gets the password from fies under /etc/webmin/virtual-server/plainpass , one for each domain named after its unique ID.

Are those files perhaps missing on your system? They should be included in backups ..

They might be missing. I used the virtualmin backup system when I migrated the sites to the new server.

When you did the backup, was Virtualmin 3.84 being used on both the old and new systems?

And did you have all features selected to be included in the backup (which is the default) ?

They should have both been the same version, but it was a while ago so it likely wasn't 3.84.

How long ago? There was a bug (now fixed) at one point that causes plaintext passwords to be excluded from backups ..

It was a couple months ago I believe. I am not sure of the exact date. It's not that big of a deal. If they update their password, will it show that link again?

Yes, if they change their password Virtualmin will store the new one.

Did you happen to check if any file existed under /etc/webmin/virtual-server/plainpass , and if so did they contain usernames and passwords?

They do. I don't know if that particular domain had one or how they are organized though.

The files are named based on each domain's unique numeric ID. You can find this for a domain with a command like :

virtualmin list-domains --domain whatever.com --id-only

Yeah, the particular domain only has one user in it. So when they update or add users, this file will get updated?

Yes, that is correct.

So for the user already in the file, can you see his password OK?

Yeah, the other user checks out ok.