Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Mail Server
  • Search

Dovecot passwd SHA512-CRYPT and VestaCP

Questions regarding the Mail Server
Dovecot, Exim, RoundCube
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
krzysztofek
Posts: 19
Joined: Fri Jan 09, 2015 2:29 pm

Dovecot passwd SHA512-CRYPT and VestaCP
  • Quote

Post by krzysztofek » Fri Mar 13, 2015 9:12 pm

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:

Code: Select all

test:{SHA512-CRYPT}$6$ypCemAhlqlwJfyB8$MG4OWVK1FHL/2/LTrP87dgFYYQ/aICgXonQIit7YI9Te3RfIYpa7sKiqJOG0impPisE2gakmXZ.ZNUr4H6KbP/:admin:mail::/home/admin:0
Best regards! :)
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Dovecot passwd SHA512-CRYPT and VestaCP
  • Quote

Post by skurudo » Sun Mar 15, 2015 8:20 pm

There is no simple answer, there need to add your code in /usr/local/vesta/bin/v-add-mail-account

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
But how it will work... dunno.
Top

krzysztofek
Posts: 19
Joined: Fri Jan 09, 2015 2:29 pm

Re: Dovecot passwd SHA512-CRYPT and VestaCP
  • Quote

Post by krzysztofek » Tue Mar 17, 2015 5:23 pm

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?
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Dovecot passwd SHA512-CRYPT and VestaCP
  • Quote

Post by skurudo » Tue Mar 17, 2015 5:39 pm

I don't know how CPanel generate passwords, it's wrong place to ask about it ;-)
Top

krzysztofek
Posts: 19
Joined: Fri Jan 09, 2015 2:29 pm

Re: Dovecot passwd SHA512-CRYPT and VestaCP
  • Quote

Post by krzysztofek » Tue Mar 17, 2015 5:48 pm

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!
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Dovecot passwd SHA512-CRYPT and VestaCP
  • Quote

Post by skurudo » Tue Mar 17, 2015 5:49 pm

Of course, if someone know the answer, it'll be good to read.
Top

krzysztofek
Posts: 19
Joined: Fri Jan 09, 2015 2:29 pm

Re: Dovecot passwd SHA512-CRYPT and VestaCP
  • Quote

Post by krzysztofek » Thu Mar 19, 2015 9:42 am

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!
Top

krzysztofek
Posts: 19
Joined: Fri Jan 09, 2015 2:29 pm

Re: Dovecot passwd SHA512-CRYPT and VestaCP
  • Quote

Post by krzysztofek » Thu Mar 19, 2015 11:28 am

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.
Top


Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Mail Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password