Dovecot passwd SHA512-CRYPT and VestaCP
-
- Posts: 19
- Joined: Fri Jan 09, 2015 2:29 pm
Dovecot passwd SHA512-CRYPT and VestaCP
Hello,
On cPanel I have {SHA512-CRYPT}$6$ passwords. I changed dovecot config and everything is working, except passwords saved from VestaCP - it saving in MD5, as default. How to change it, and get work with SHA-512 passwords?
my pass scheme:
Best regards! :)
On cPanel I have {SHA512-CRYPT}$6$ passwords. I changed dovecot config and everything is working, except passwords saved from VestaCP - it saving in MD5, as default. How to change it, and get work with SHA-512 passwords?
my pass scheme:
Code: Select all
test:{SHA512-CRYPT}$6$ypCemAhlqlwJfyB8$MG4OWVK1FHL/2/LTrP87dgFYYQ/aICgXonQIit7YI9Te3RfIYpa7sKiqJOG0impPisE2gakmXZ.ZNUr4H6KbP/:admin:mail::/home/admin:0
Re: Dovecot passwd SHA512-CRYPT and VestaCP
There is no simple answer, there need to add your code in /usr/local/vesta/bin/v-add-mail-account
But how it will work... dunno.
Code: Select all
if [ -x '/usr/bin/doveadm' ]; then
md5=$(/usr/bin/doveadm pw -s md5 -p "$password")
else
md5=$(/usr/sbin/dovecotpw -s md5 -p "$password")
fi
if [[ "$MAIL_SYSTEM" =~ exim ]]; then
str="$account:$md5:$user:mail::$HOMEDIR/$user:$quota"
echo $str >> $HOMEDIR/$user/conf/mail/$domain/passwd
fi
-
- Posts: 19
- Joined: Fri Jan 09, 2015 2:29 pm
Re: Dovecot passwd SHA512-CRYPT and VestaCP
I found that earlier. I was thinking that I found, a code to generate here. cPanely actually generating SHA-512 hashes, where I can find script that generating this?
Re: Dovecot passwd SHA512-CRYPT and VestaCP
I don't know how CPanel generate passwords, it's wrong place to ask about it ;-)
-
- Posts: 19
- Joined: Fri Jan 09, 2015 2:29 pm
Re: Dovecot passwd SHA512-CRYPT and VestaCP
I know, but there was, a little bit chance to get the info ;-) When I found the solution I'll give, a response in that topic for rest of community. Best regards!
Re: Dovecot passwd SHA512-CRYPT and VestaCP
Of course, if someone know the answer, it'll be good to read.
-
- Posts: 19
- Joined: Fri Jan 09, 2015 2:29 pm
Re: Dovecot passwd SHA512-CRYPT and VestaCP
I propably found the solution. In /usr/local/vesta/bin/v-add-mail-account we should code with mkpasswd command. I don't try because dovecot work with both encryptions. For me MD5 is enought. Old accounts have SHA512. Regards!
-
- Posts: 19
- Joined: Fri Jan 09, 2015 2:29 pm
Re: Dovecot passwd SHA512-CRYPT and VestaCP
VestaCP have dedicated plugin for roundcube... My installation exists in /var/lib.roundcube but driver is in /usr/share/roundcube. I copied, configured and it's not working. /var/log/roundcube say's that the driver is broken. I found that topic on GitHub: https://github.com/serghey-rodin/vesta/issues/88
and updated my driver. It's still not working... Now /var/log.roundcube says nothing and I'm gettng error from roundcube while trying to change my e-mail pass:
Error Ocurred!
Failed to save new password.
I transalted it from my language so it can look little diferent.
As I says, logs for now says nothing - Driver broken error disapear but now i have another problem.
Roundcube 1.1.0, newest VestaCP and Debian 7.5 64-bit.
Regards.
update:
vesta system.log output this:
2015-03-19 12:53:00 v-get-mail-account-value admin domain.tld mylogin md5
another observation:
When i put in new password field my current password procedure passed successful. But passwd file is untouched.
I also tried to change permissions, but without results.
and updated my driver. It's still not working... Now /var/log.roundcube says nothing and I'm gettng error from roundcube while trying to change my e-mail pass:
Error Ocurred!
Failed to save new password.
I transalted it from my language so it can look little diferent.
As I says, logs for now says nothing - Driver broken error disapear but now i have another problem.
Roundcube 1.1.0, newest VestaCP and Debian 7.5 64-bit.
Regards.
update:
vesta system.log output this:
2015-03-19 12:53:00 v-get-mail-account-value admin domain.tld mylogin md5
another observation:
When i put in new password field my current password procedure passed successful. But passwd file is untouched.
I also tried to change permissions, but without results.