Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 4 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
1  
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
add comment

You can use the doveadm utility that comes with Dovecot:

$ doveadm pw -s CRYPT
Enter new password: 
Retype new password: 
{CRYPT}1cElWVzS3.EVg
share|improve this answer
add comment

Your Answer

 
discard

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.