Discussion in 'Installation/Configuration' started by m u r, Aug 22, 2005.

  1. m u r

    m u r Member

    Is there any way to retrieve or reset the admin password for ISPConfig? Am I screwed?

    I'm almost positive I'm entering the right password, but ISPConfig won't let me in. I can still login on the machine as root.
    Last edited: Aug 22, 2005
  2. falko

    falko Super Moderator Howtoforge Staff

    You can use phpMyAdmin. In your ISPConfig database, go to the table sys_user and fill in "admin" (using MySQL's MD5 function!) in the passwort column of the user admin.
  3. m u r

    m u r Member

    What's the easiest way to install phpMyAdmin outside of ISPConfig, and will that mess up ISPConfig?

    What's the MD5 function?
    Last edited: Aug 22, 2005
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If you have already a site configured in ISPConfig that has php enabled, you can install phpmyadmin there. Download it from the phpmyadmin homepage and follow the installation instructions inside the phpmyadmin package.

    Thats a function in mySQL. The SQL query to update the password is:

    UPDATE sys_user SET passwort = md5('myNewPassword') WHERE username = 'admin'
  5. m u r

    m u r Member

    I am a complete novice, and I apologize.

    Thanks for your reply. I do have sites set up, but I don't think there are databases yet.

    the following are the phpMyAdmin install instructions, but I do not understand some things:

    1. Untar or unzip the distribution (be sure to unzip the subdirectories): tar -xzvf phpMyAdmin_x.x.x.tar.gz in your webserver's document root Does this mean the box's root? . . . /root/ ? . If you don't have direct access to your document root, put the files in a directory on your local machine, and, after step 3, transfer the directory on your web server using, for example, ftp.

    2. Ensure that all the scripts have the appropriate owner (if PHP is running in safe mode, having some scripts with an owner different from the owner of other scripts will be a problem). See FAQ 4.2 for suggestions. Do I need to worry about this?

    3. Open the file in your favorite editor and change the values WHERE do I change the values? for host, user, password and authentication mode to fit your environment. Here, "host" means the MySQL server host: Have a look at Configuration section for an explanation of all values. Please also read the remaining of this Installation section for information about authentication modes and the linked-tables infrastructure.

    4. It is recommended that you protect the directory in which you installed phpMyAdmin (unless it's on a closed intranet, or you wish to use HTTP or cookie authentication), for example with HTTP-AUTH (in a .htaccess file). See the multi-user sub-section of the FAQ for additional information, especially FAQ 4.4. Do I need to worry about this?

    5. Open the file <>/<your-install-dir>/index.php ? /index.php
    in your browser. phpMyAdmin should now display a welcome screen and your databases, or a login dialog if using HTTP or cookie authentication mode.

    Sorry for all this, but I'm going crazy and am desperate for help!
  6. thebigfing

    thebigfing New Member

    The PHP my admin can be download from here and can be installed by draging and dropping and then change the config file.

    MD5 is a description you can create a MD5 hashe on this website:

    The Big Fing
  7. m u r

    m u r Member

    Drag and drop where? I downloaded it and it's unpacked in the root's home folder. I'm sorry. I need specific instructions. I am completely lost.
  8. thebigfing

    thebigfing New Member

    You must drag and drop it in your website folder so you can reeche it whit your webbrouwser. You must also edit the config file the coments give you there atvice so that you now what you must type in.
  9. m u r

    m u r Member

    OK, I uploaded phpMyAdmin onto the site and can access it. I clicked "browse" next to sys_user in my ispconfigdb. I checked the user "admin" and clicked the pencil to edit it. The row "passwort," I selected the MD5 function, and entered "UPDATE sys_user SET passwort = md5('myNewPassword') WHERE username = 'admin'" in the value input. Then I clicked "go" at the bottom of the first section of fields. I wasn't sure if I needed to do anything after that.

    and . . .

    I still can't login.

    Earlier . . . I logged into the box as root and changed the password for the user "admispconfig," thinking it was the password to login to port 81. Could this be the reason?
    Last edited: Aug 23, 2005
  10. falko

    falko Super Moderator Howtoforge Staff

    I've made 2 screenshots that show you how to do it.

    Attached Files:

  11. m u r

    m u r Member

    Yes! Thanks!!!!!!
  12. m u r

    m u r Member

    Yes!!! Thanks!!!
  13. AdamZtech

    AdamZtech New Member

    Reset ISPConfig Admin Password from Command Line

    I had a similar problem. I used a random password generator that created a password with "/" in it, and I couldn't log in after I changed my admin password. I read this thread, and thought that it was too much trouble to setup phpMyAdmin, so after a little research, I figured a way to reset the admin password through the command line:

    > mysql -h localhost -u root -p
    > use ispconfigdb
    > update sys_user set passwort = md5('admin') where username = 'admin';
    > quit

    First line logs you into mysql from the command line with your mysql root password. The third line resets the the admin user password to "admin".
  14. martinfst

    martinfst Member Moderator

    May I ask to copy/paste the actual commands you used? As this syntax can never work. It should be:
    use ispconfigdb[COLOR="Red"];[/COLOR]
    update sys_user set [COLOR="Red"]password[/COLOR] = md5('admin') where username = 'admin';
  15. AdamZtech

    AdamZtech New Member

    Sorry, but the commands are long gone from my screen and buffer.

    I'm sure your corrections are right on, though the "update..." command was a copy and paste from a previous post in this thread.
  16. falko

    falko Super Moderator Howtoforge Staff

    Actually, passwort is correct, as password is a reserved word in MySQL. ;)
  17. martinfst

    martinfst Member Moderator

    Apologies, I had mixed up the mysqladmin password change command and the change of an item in an application specific table. :eek:

Share This Page