Upgraded to 2.2.6 from 2.2.3 -> now I can't login

Discussion in 'General' started by digerata, Sep 26, 2006.

  1. digerata

    digerata New Member

    Hello,

    I recently installed 2.2.6 over 2.2.3 that had an existing setup with about 10 websites. Unfortunately, now I can't login with any of the ispconfig users. Upon login, I always get an ERROR 101: wrong username or password. I checked the sys_user table and all of the users still exist. They all also appear to have MD5 encoded passwords versus the MySQL PASSWORD method.

    Any ideas?

    Thanks!!!!!

    -Mike
     
  2. fobicodam

    fobicodam New Member

    it happened to me too, the only way to log in was get into a terminal (putty or something) as root, then:

    mysql -p
    (put your root mysql password)
    USE db_ispconfig (or your ispconfig's database name)
    update sys_user set passwort = md5('newpassword') where username = 'theusername'


    I wrote that from memory without check, if something gives you an error ask me again :)
     
  3. digerata

    digerata New Member

    Thanks for the suggestion, fobicodam!

    I had actually attempted that earlier, but used the mysql PASSWORD() function instead of md5 for the update. I wasn't aware of the md5 function. Regardless, that hadn't worked. I just went and tried using md5() like you suggested, confirmed the change in the db, and then restarted ispconfig_server. Unfortunately, it didn't work :(.

    I looked in the file: /home/admispconfig/ispconfig/lib/classes/ispconfig_auth.lib.php

    And saw that during the authentication process, ispconfig checks against both forms of password encryption (MD5() and MySQL PASSWORD()) (on line 55). This makes me think that either of the above attempts should have allowed me to login.

    Any ideas?
     
  4. fobicodam

    fobicodam New Member

    None usefull.. sorry.. :eek:
     
  5. digerata

    digerata New Member

    Thanks anyway!

    Does anyone know how to increase the log levels and maybe spit out some information about the authentication process?

    I would go so far as to try and add some logging to see what is going on. While, I'm a developer, I'm not a php developer and unsure of the appropriate logging mechanism for this app. Is there a developer out there who could point me in the right direction for adding debug statements?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    In sys_user table the passwords may be either mysql password encoded or md5, both works.

    In most cases such a login error is caused by a problem with your mysql login, please check that the username and password for the mysql database in the config.inc.php file are correct.
     
  7. digerata

    digerata New Member

    It is correct. Just to prove it to myself, I changed the password to something else. Upon login attempt, I get a php connect error:

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 77

    When I change it back, the message goes away I get the standard wrong username or password message and login prompt.

    So just to be clear, when upgrading minor versions of ispconfig, there is no issue with using the same databases?

    If that is an okay thing to do, I don't understand why this is failing.
     
  8. digerata

    digerata New Member

    Strangest thing!

    I tried to do the same thing again, manually updating the password in mysql with passwort = md5('myoriginalpassword'). That didn't work, again.

    Then out of frustration I did passwort = md5('1'). That works! I could log in.

    I was then able to reset it through the admin interface.

    WTF!?

    Thanks to all who helped out!
     

Share This Page