Issues after upgrading to build 1.8 version 5

@CyberPanel deleted “backup” folder and tried backup but again same result. Let me explain what happens,

  1. I went to “backup/create backup”.
  2. Selected a “Website”.
  3. Didn’t selected any “Destination”.
  4. Clicked “Create Backup”.
  5. For 2-3 sec loading animation showed.
  6. After the animation nothing is showing, like “backing up database” or “backing up website directory” etc.
  7. If I reload or click the “Select Website” drop-down menu and again select the same website it shows in the table below as this, “10 backup-website-01-11-11-Sat-Jul-2019 01-11-11-Sat-Jul-2019 0 Pending”

@pauloandres said:
Hi, I have another issue added to those of minhazulOO7.
After upgrade all the emails password don’t work. To correct it, I had to change the passwords of each email :frowning:

@Hifihedgehog bro check this, @pauloandres bro posted this after upgrading to build 1.8 version 5. I don’t use CyberPanel email that’s why don’t know of this issue.

Im not sure if its due to the upgrade or what, but I have onyl use 1.8.5 and above and backups have not worked on both premade Digital Ocean servers or self-installed. Emails aren’t working either it appears.

“Running cat: /home/my.domain.com/backup/backupFileName: No such file or directory”

When running backups

@minhazulOO7 said:

@pauloandres said:
Hi, I have another issue added to those of minhazulOO7.
After upgrade all the emails password don’t work. To correct it, I had to change the passwords of each email :frowning:

@Hifihedgehog bro check this, @pauloandres bro posted this after upgrading to build 1.8 version 5. I don’t use CyberPanel email that’s why don’t know of this issue.

Just to clarify, I had asked about 1.8.6 and I upgraded to 1.8.6 and that is when the problems started with emails. I had no email authentication or log in issues until 1.8.6. 1.8.5 had no issues at all with email.

@CyberPanel more issues! I have disabled “PowerDNS” because I don’t need it. Is this the cause why backup’s not working? Also when I tried to enable “PowerDNS” by selecting “Default” function mode it shows “Changes successfully applied” but reloading the “PowerDNS” service page shows it’s disabled! Also checked “serverstatus/services” “PowerDNS” is running! Because “PowerDNS” service page shows it’s disabled, in the sidebar menu no “DNS” option is available.

@Hifihedgehog said:

@minhazulOO7 said:

@pauloandres said:
Hi, I have another issue added to those of minhazulOO7.
After upgrade all the emails password don’t work. To correct it, I had to change the passwords of each email :frowning:

@Hifihedgehog bro check this, @pauloandres bro posted this after upgrading to build 1.8 version 5. I don’t use CyberPanel email that’s why don’t know of this issue.

Just to clarify, I had asked about 1.8.6 and I upgraded to 1.8.6 and that is when the problems started with emails. I had no email authentication or log in issues until 1.8.6. 1.8.5 had no issues at all with email.

Although changing email pass isn’t a feasible option, let’s wait it will be fixed.

@Hifihedgehog

Which password scheme did you use before v1.8.6 ?

Passwords were unencrypted as they came with CyberPanel.

@Hifihedgehog

looks like MD5 or something.

That’s the bug I describe in the ticket, CyberPanel. They became MD5 encrypted only after I ran the update for 1.8.6. They were originally unencrypted prior to running the update.

@Hifihedgehog

They should be in the {CRYPT} format after upgrade.

If you have plain passwords from your backups, kindly restore them and re-upgrade make sure they are in crypt format.

They should be but the upgrade converted them to MD5. Can you please fix this since this was a bug in your code? Thanks!

@Hifihedgehog

We converted them to CRYPT format. Anyways you can open /etc/dovecot/dovecot.conf

and paste auth_mechanisms = cram-md5 and then do systemctl restart dovecot

See if your issue is resolved.

No, that didn’t work. To confirm, I did the following:

  1. Executed in terminal the following: nano /etc/dovecot/dovecot.conf
  2. Pasted the following line at the end of the file dovecot.conf: auth_mechanisms = cram-md5
  3. Saved the file and exited Nano.
  4. Executed in terminal the following: systemctl restart dovecot
  5. Attempted to log into one of my email accounts. Didn’t work.

To repeat, my recent upgrade timeline was this.

  1. Upgraded to 1.8.5: All passwords were still stored in non-encrypted form. This was the default or stock configuration for my CyberPanel installation. Had no issues with email logins.
  2. Upgraded to 1.8.6. Passwords of all existing accounts were converted to MD5. This appears to have been due to the migration code in your upgrade scripts. Attempting then to log in fails with any preexisting emails. Creating a new email, however, encrypts the password with CRYPT and logins with a new email account work flawlessly.

I noticed what you did. You converted all the email passwords now to CRAM-MD5. As I stated from the beginning, when the passwords are in MD5, logins fail. If I create new emails accounts, the new email account system in 1.8.6 encrypts those new emails’ passwords with CRYPT. I am not sure if you are aware of this, but CRYPT is what the new system is using for email logins and for creating new email accounts. As a result, CRYPT works. MD5 doesn’t. The way to fix this, I believe is.

  1. Unencrypt any passwords encrypted with CRAM-MD5.
  2. Reencrypt these decrypted passwords into CRYPT.

For those who are upgrading, your script, as it stands, encrypts those with preexisting, unencrypted email accounts to MD5 and that simply does not work.

Note that I restored my e_users table files to the following location:

/root/temp/lib/mysql/cyberpanel

There are the frm and ibd files for e_users. Note that you cannot simply copy them over since you changed the table definition and it will not be accepted by the MariaDB SQL dictionary. But that passwords are there so hopefully you can manage to restore them since I personally don’t have the tools to efficiently extract them. Thanks!

@Hifihedgehog

what is output of cat /etc/dovecot/dovecot-sql.conf.ext

Make sure to mask your passwords.

Here is the output:

driver = mysql
connect = host=localhost dbname=cyberpanel user=cyberpanel password=* port=3306
password_query = SELECT email as user, password FROM e_users WHERE email=’%u’;

I readded the line, restarted dovecot and even rebooted my server. Email logins fail despite all that.

Ah, found it! Traversing to the subfolder /etc/dovecot/conf.d/, there is a 10-auth.conf file. There, the line auth_mechanisms = is found, but it is defined as “plain” only. This file supersedes and takes precedence over whatever is specified in the dovecot.conf file in the parent folder. Your upgrade script should have edited this line to include MD5 because the script as it was inadvertently converted all the email passwords to irreversible MD5 hashes.

To sum it up, the fix is simple:

  1. Execute in terminal the following: nano /etc/dovecot/conf.d/10-auth.conf
  2. Edit the following line in the file 10-auth.conf to include cram-md5. It should already have plain: auth_mechanisms = plain cram-md5
  3. Save the file and exit Nano.
  4. Execute in terminal the following: systemctl restart dovecot

After that, everything should work as before. I hope this helps anyone else experiencing the same difficulties as I did!

I have an issue with your use of CRYPT with new accounts and MD5 for migrating old ones. Either all the accounts need to be MD5 or they all need to be CRYPT for SQL scripting I use to work properly. I have a password changing system in my email system and I also have a PHP email registration page as well that need consistency in encryption to work. Neither can work consistently unless the system uses MD5 throughout since all my old accounts, due to the mistake in the migration code from 1.8.5 to 1.8.6, are all MD5 hashed. Can you change your code to encrypt with MD5 for new accounts? Otherwise, I have to tell all my users they will be losing their passwords and I will get the heat from them, let me tell you.