admin password not working

  • hey everbody, I just changed my admin password but its not working. i dont know why i double checked it a couple times. might be an issue with some of the special characters?
    anyway i cant change it to something else altought /etc/imscp/imscp.conf contains the right email address for the admin account. (ssh is still working)


    is there any way to get this fixed somehow? thanks for help.

  • You can use the "lost password" function:
    http(s)://yourpanel.tld/lostpassword.php


    If there's no email defined:

    • login in mysql as imscp/root
    • switch to the "admin" table
    • search your admin user
    • set an email adress in the column email


    Or just change your password in the db. For that

    • login in mysql as imscp/root
    • switch to the "admin" table
    • search your admin user
    • set a new password in admin_pass (encrypted, NOT plain)
      For the encryption you can use following imscp php-function:
      Code
      1. cryptPasswordWithSalt($_POST['password']), $userId);


      https://github.com/i-MSCP/imsc…hared-functions.php#L3182


    PS: Please tell us the special chars in your password, so we can fix that issue. I bet it's because of the magic quotes :D

  • when i'm using mysql on command line i get:


    Access denied for user 'root'@'localhost' (using password: NO)


    well my awesome special characters are: }><[/"^


    its a generated password, so its not my fault xD


    thanks for help

  • Login should work as root or imscp user. But try following:

    • Replace the " character in the password with an \"
    • Then use this password for login
  • ok is tried, but it wont work.


    i started the mysqld in safemode and looked at the admin email, its correct but i wont get any email with a new password.


    is there a way to just create a second admin account? or just change my password to 123 temporary?

  • May you can run the installer again and change there the Admin password... Otherwise do the steps I described yesterday..


    PS: you can also change the php files :D

  • good morning,


    if i run the installer again, will it overrite all existing settings and delete everything?
    how is the php aproach?


    The stupid thing is have placed the right email address for the admin account but it still wont send me any email....

  • Hello ;


    @Ninos You like to complicate your life :D


    @Serious_Sammy


    For the admin password you can also do:


    SQL
    1. # mysql -u root -p<password>
    2. > use imscp;
    3. > UPDATE admin SET admin_pass = MD5('YOUR_NEW_PASSWORD') WHERE admin_name = 'YOUR_ADMIN_NAME';
    4. > TRUNCATE login;
    5. > quit


    In order, this will:

    • Update the admin password
    • Truncate the login table to be sure that you are not banned (this will also disconnect any other user)


    Here we are using MD5 but at first login, the password will be re-encrypted using the better algorithm which is available on your system.


    If you have lost your SQL root password, you can connect using the debian-sys-maint user. You can see its password which is in the /etc/mysql/debian.cnf file.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206