Announcement

Collapse
No announcement yet.

EspoCRM migration to a new hosting server login problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • EspoCRM migration to a new hosting server login problem

    Hi everyone,

    I have migrated an old EspoCRM (5.x) system to a new hosting server, database backup and restore, all files restored to the new hosting.

    I can get normally to the login page on the new server installation but none of the users / passwords are working. Wrong username / password error message.

    Everything seems to have migrated ok. What is wrong / missing?

    Thanks,

    Nuno
    Last edited by nunos; 02-20-2024, 11:23 AM.

  • #2
    Hi nunos,

    - Please enable Debug mode in your instance on the new server: https://docs.espocrm.com/administrat...ng/#debug-mode.
    - Reproduce the error
    - Submit the EspoCRM error log. By default, log files are created in {ESPO_ROOT}/data/logs/ directory.​

    Comment


    • #3
      Hi there,

      Could you check if the
      Code:
      passwordSalt
      value inside the file
      Code:
      data/config-internal.php
      is still the same (from before your migration) ?
      This parameter is (re)generated when you install an EspoCRM (
      Code:
      install/core/Installer.php inside saveData() at line 392
      )

      Regards,
      Firyo.

      Comment


      • espcrm
        espcrm commented
        Editing a comment
        This is likely the problem. You can either reset the password or change the 'salt' (I remember this is the harder method). Luckily for me when I migrate like this I didn't have many account and just forced everyone to have new password.

        Anyway from what I know. Salt is basically a random extra data that get add before your password is encrypted. That way if your database get leak, the true password is hidden and unknown and people can't use the same password/email/username to 'hack' other website.

      • nunos
        nunos commented
        Editing a comment
        Hi Firyo,

        Sorry for the delay... was away during some time...

        The passwordSalt param in data/config-internal.php is different from the old install version.

        Can i update it? How?

        Thanks,

        Nuno

    • #4
      Hi,
      it's really basic error : new server say : new php version certainly, all php extension installed.
      espoCrm v5.x is "senior" now.
      if new server, php is certainly newer.

      Comment


      • #5
        nunos, if you managed to log in normally, you can change user passwords to temporary ones through the UI or through the CLI: https://docs.espocrm.com/administrat...st-cant-log-in.

        Also, if users have the specified e-mails and Outbound Emails is configured, users can create a new password for themselves or you via the Send Password Change Link.

        Click image for larger version

Name:	image.png
Views:	42
Size:	13.5 KB
ID:	105861

        Comment


        • nunos
          nunos commented
          Editing a comment
          Thanks victor,

          No luck, at the moment i can't login with any user/password, not even admin.

          Just the message "Wrong username/password"

          And no access to CLI ...

          EspoCRM version installed 8.1.1

          The strange thing is that after the update i have been able to login to the system and then logout. After that not allowing to login anymore.
          Last edited by nunos; 05-08-2024, 12:23 PM.

      • #6
        nunos,

        Using EspoCRM on your own server without access to the CLI is quite inconvenient, and at different stages of operation, you will encounter various problems that are easily solved through the CLI and difficult to solve (or not solved at all) when there is no access to the CLI.

        In your case, there is still an opportunity to fix the situation:
        - as yuri suggested in this post: https://forum.espocrm.com/forum/gene...0564#post10564;
        - and how a community member implemented this advice: https://forum.espocrm.com/forum/gene...0578#post10578.

        Please note that passwordSalt was located in your_instance_name/data/config.php for older versions of EspoCRM, and in your_instance_name/data/config-internal.php for newer versions.

        Comment


        • nunos
          nunos commented
          Editing a comment
          Thanks @victor,

          Going to give it a try...

      • #7
        Ok guys, so i think i got it, thanks to the following post https://forum.espocrm.com/forum/gene...word#post10564 Thanks victor !!!

        The solution is to install a new instance of EspoCRM into a new directory (just to be able to extract the necessary data)

        1 - Install new EspoCRM instance
        2 - Copy passwordSalt info from the new installed instance to your current instance (config.php for older versions of EspoCRM, config-internal.php for recent ones)
        3 -
        With PHPmyadmin copy hashed password from new installed instance (Admin or any other user) to current instance PHPmyadmin (Admin or any other user)
        4 - login

        Nuno​

        Comment

        Working...
        X