Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used one web based control panel to create some virtual users for Dovecot. That control panel no longer works so I need to do this manually.

I need to reset the password for one (virtual) user which is listed in dovecot.passwd file. The file uses CRYPT schema. How do I reset that password?

So the question boils down to - what can use to convert plain text password to CRYPT encrypted format?

share|improve this question
up vote 6 down vote accepted

You can use the Apache utility htpasswd. It uses crypt() to encrypt passwords by default on Linux platforms. The following will prompt you for the new password for the user jscott and will update the file /etc/dovecot/dovecot.passwd.

htpasswd /etc/dovecot/dovecot.passwd jscott

share|improve this answer
Word of caution. If you are using the same file as userdb too then it will have other fields which the above method will remove. So instead I guess the safer way is to use htpasswd -n jscott. This will print the encrypted password to console. Copy that manually into the passwd file. – AppleGrew Feb 6 '12 at 3:21

You can use the doveadm utility that comes with Dovecot:

$ doveadm pw -s CRYPT
Enter new password: 
Retype new password: 
share|improve this answer
Does this make the dovecot password independent of the linux user password? – User Oct 31 '15 at 19:40
@User: Not by itself. This is for virtual users; system users use the system password. See – Richard Hansen Oct 31 '15 at 19:53
Can a virtual user and a system user have the same username? – User Oct 31 '15 at 20:23

or to avoid the prompts do:

doveadm pw -s CRYPT -p yourpassword -u user

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.