If you lost your ISPConfig 3 administrator password, you can reset it with the following SQL query.

UPDATE sys_user SET passwort = md5('admin') WHERE username = 'admin';

The SQL query sets the password to "admin" for the user "admin", it has to be executed in the ISPConfig mysql database, e.g. with phpmyadmin. If you dont have phpmyadmin installed, then the query can be executed with the mysql commandline utility as well:

Login to the mysql database.

mysql -u root -p

Then enter the password of the mysql root user. To switch to the ISPConfig database, run this command:

use dbispconfig;

And execute the SQL command:

UPDATE sys_user SET passwort = md5('admin') WHERE username = 'admin';

Finally close the mysql shell:

quit;
Facebooktwittergoogle_plusredditlinkedinmail
Tagged on:     

24 thoughts on “How to reset the administrator password in ISPConfig 3

  • December 4, 2009 at 10:52 pm
    Permalink

    I need this help but met some trouble as reply to (UPDATE sys_user SET passwort = md5(’admin’) WHERE username = ‘admin’;) comand:
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘▒▒admin’) WHERE username = ‘admin’’ at line 1
    I fix it by changing your _’_ to my _’_ in text editor but thank you for your help very much 🙂 it realy help me.

    Reply
  • January 14, 2010 at 3:52 am
    Permalink

    there is a typo.

    passwort should be password

    Reply
    • January 14, 2010 at 8:23 am
      Permalink

      Thats no typo, the database field is named passwort with “t”. In german, the word password is passwort.

      Reply
  • February 23, 2010 at 1:34 am
    Permalink

    mysql> UPDATE sys_user SET password = md5(.admin.) WHERE username = .admin.;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) WHERE username = .admin.’ at line 1
    mysql>

    i seem to be getting the same error but after fixing the typo

    i appreciate any help

    regards
    serge023

    Reply
  • February 23, 2010 at 1:47 am
    Permalink

    i try ‘ ” ` and get this santex UPDATE sys_user SET passwort = md5(‘admin’) WHERE username = ‘admin’;
    bash: syntax error near unexpected token `(‘

    Reply
  • February 23, 2010 at 8:54 am
    Permalink

    This is a SQL command. You have to execute it on the mysql commandline or in phpmyadmin and not in bash.

    Reply
  • January 21, 2011 at 9:06 pm
    Permalink

    Thanks. Worked like a charm.

    Reply
  • October 27, 2011 at 1:59 pm
    Permalink

    this is not working for me , I’ve tried to reset db passd from passwort field on sys_users table but passwds are not an MD5!!

    $1$………….. -> no MD5…

    I’ve tried t crack it with john,..& no success…( curiously John detects it as a MD5 Hassh FreeBSD ,.. )

    I’ve trtied tu update panel admin passwd copying & pasting a known passwd in another ispconfig panel and it’s not working sombody can help me plz?

    txz in advance.

    Paul

    Reply
    • October 27, 2011 at 2:26 pm
      Permalink

      Resetting the password as described above works fine as ispconfig has a md5 fallback mode. But you can not crack the password like you tried it as the passwords saved by ispconfig are encrypted with crypt-md5 plus salt, which is the standard of most Linux distributions.

      Reply
      • October 27, 2011 at 3:19 pm
        Permalink

        Hi, thanks 4 the fast reply 😉

        but it’s still not working to me,…

        UPDATE `dbispconfig`.`sys_user` SET `passwort` = MD5( ‘admin’ ) WHERE `sys_user`.`userid` =1;

        and after try to login it refresh the main login screen,… :S

        logs only say:

        [Thu Oct 27 14:29:25 2011] [error] [client n.n.n.n] PHP Notice: Undefined index: login in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 140, referer: https://n.n.n.n/index.php

        cat /var/log/ispconfig/ispconfig.log <— it's empty,..ispconfig does not save logs,…
        somewhere to enable it?

        it's a fresh installation with 3 sites created nothing special,…..
        any idea?

        Paul

        Reply
        • October 27, 2011 at 3:22 pm
          Permalink

          Then your problem is not a wrong admin password, most likely ispconfig can not connect to its mysql database anymore. Please post in our forum to get support for ISPConfig:
          http://www.howtoforge.com/forums/ on this issue.

          Reply
  • November 3, 2011 at 2:30 pm
    Permalink

    Hi all,

    Paul, you are trying a bad synthax to change password !

    The good synthax is :

    UPDATE sys_user SET password = md5(‘admin’) WHERE username = ‘admin’;

    password and NOT passwort.

    Reply
    • November 3, 2011 at 2:41 pm
      Permalink

      No, its really passwort with ‘t’ 🙂 The field name is in German language (by the way, ist the only field name in german languge in ISPConfig) and in german its “passwort”. Just as a sidenote, password is a command in mysql syntax, so if you ever want to use password as field name in a mysql database, then you have to enclose it in backticks.

      Reply
  • September 8, 2012 at 9:11 am
    Permalink

    Hi guys,
    i am receiving same error with
    UPDATE sys_user SET passwort = md5(‘admin’) WHERE username = ‘admin’;

    but this one works for me
    update sys_user set passwort = md5(‘admin’) WHERE username = ‘admin’;

    Thanks for the tip.

    Reply
  • September 10, 2012 at 4:06 pm
    Permalink

    please be extremly careful about the apostrofe character. At best – retype it – do not copy/paste it otherwise you will be getting weird errors like the guys above….

    Reply
  • October 8, 2012 at 2:01 pm
    Permalink

    Thank you, Jan, endeed, the apostrophes cannot be copied, one has to type it!

    Reply
  • October 15, 2013 at 12:58 pm
    Permalink

    For me working this:

    UPDATE sys_user SET passwort = md5(‘admin’) WHERE username = ‘admin’;

    “passworT” is good way 😛

    Bye & thanks!

    Reply
  • October 20, 2013 at 9:42 pm
    Permalink

    when I just copied the command I got an error in phpmyadmin, I had to replace the backticks with single or double quotes.

    Reply
  • April 20, 2014 at 1:55 am
    Permalink

    Hi, I know this is an old topic but I have ran into some trouble. I was unable to log into my ispconfig3 control panel and was unsure of the password. So I reset it using “update sys_user set passwort = md5(‘admin’) where username = ‘admin’;”

    I still cannot login. I can connect to the dbispconfig database using phpmyadmin or the command line. I have check that the database name, user and password in the urs/local/ispconfigserver/lib/config.inc.php file is correct. Still on any attempt to log in with any user I get Username or Password empty. I’m starting to think it is not a password issue at all!

    I can access all databases using the various database users and passwords. I can even access ispconfig using the user ispconfig and the the proper password for that user. But no love logging in…

    Any ideas what could be wrong? What should I be checking next?

    Thanks for the help!

    Reply
  • May 6, 2014 at 10:02 pm
    Permalink

    I received the same error most are reporting when using the lazy way of copy and paste. If you type the command it works fine!

    Reply
  • May 19, 2014 at 4:12 pm
    Permalink

    thx. worked.

    Ps: many write-only users….”TYPO, TYPO” Not known any language only english.
    (i’m not too good in english, i’m hungarian. But i can read)

    Reply
  • June 9, 2014 at 10:57 am
    Permalink

    Hi,
    I an ver new to this server and recently lost my password. I see you have given the code to retrieve it but I do not know where I have to type the code. Can any one help please.

    Thanks

    Reply
  • March 23, 2015 at 5:34 pm
    Permalink

    Thanks works excellent

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *