• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Fog WebUI Password Successfully Reset But Still Can't Login

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    25
    3.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sebastian Roth Moderator
      last edited by Sebastian Roth

      @lmioperations said in Fog WebUI Password Successfully Reset But Still Can't Login:

      and I verified that I had the hash typed exactly as it is in the document

      Usually when not copy and pasted those things can go wrong easily. Especially as there are characters like 0 (zero) and O (uppercase O), l (lowercase l) and 1 (one) and more of those false friends…

      Please retry setting the fog user password in the DB and copy&paste this time!

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 0
      • L
        lmioperations
        last edited by

        I copied and pasted it this time (here’s the results and proof):
        0_1501241798288_fog_p-reset.png

        When I try logging in, I still get the same results :-X…

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by

          @lmioperations In the message I see Rows machted: 1 Changed: 0 Warnings: 0 which looks as if it wasn’t changed at first. But as far as I remember this is because the value already matches so mysql is smart enough to not change it (to the same) again. But just to make absolutely sure run:

          mysql> UPDATE `users` SET `uPass` = 'test' WHERE `uName` = 'fog';Query OK, 1 row affected (0.00 sec)
          Rows matched: 1  Changed: 1  Warnings: 0
          
          mysql> UPDATE `users` SET `uPass` = '$2y$11$g0Hu8OaOStuPk7WWYGh6Wu4PLlZDZGOkzMwEEAk.rZMrI9IdDwno.' WHERE `uName` = 'fog';
          Query OK, 1 row affected (0.00 sec)
          Rows matched: 1  Changed: 1  Warnings: 0
          

          By the way, which password do you think the default password is? I don’t see it mentioned in the wiki so possibly you expect the default to be something different than password?

          If all this is not working for you please check the apache error logs on messages when you try logging in. See my signature on where to find those log files on your FOG server.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          L 1 Reply Last reply Reply Quote 0
          • Tom ElliottT
            Tom Elliott
            last edited by

            Also, what password are you using to login? I just tested using the reset update statement and it worked.

            The password that’s being set is password

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            L 1 Reply Last reply Reply Quote 0
            • L
              lmioperations @Sebastian Roth
              last edited by

              @sebastian-roth Yep, that was one of my first indications that I had likely successfully updated the password on my previous attempts (when I saw no change).

              I just tried the command to set the password to “test” and got “Changed: 1”. I tried logging in to the WebUI with “fog” and “test” and it failed.

              As you stated, the password is not listed in the wiki (which is a great time for an admin to update it 😉 ), but I assumed it was “password” based on this other link: https://wiki.fogproject.org/wiki/index.php?title=Password_Central

              Here’s the output of my apache error log:

              [Fri Jul 28 06:25:03.202321 2017] [mpm_prefork:notice] [pid 1327] AH00163: Apache/2.4.27 (Ubuntu) OpenSSL/1.1.0f configured -- resuming  normal operations
              [Fri Jul 28 06:25:03.202354 2017] [core:notice] [pid 1327] AH00094: Command line: '/usr/sbin/apache2'
              [Fri Jul 28 07:41:47.596342 2017] [mpm_prefork:notice] [pid 1327] AH00169: caught SIGTERM, shutting down
              [Fri Jul 28 07:42:09.847435 2017] [mpm_prefork:notice] [pid 1353] AH00163: Apache/2.4.27 (Ubuntu) OpenSSL/1.1.0f configured -- resuming  normal operations
              [Fri Jul 28 07:42:09.864642 2017] [core:notice] [pid 1353] AH00094: Command line: '/usr/sbin/apache2'
              
              1 Reply Last reply Reply Quote 0
              • L
                lmioperations @Tom Elliott
                last edited by

                @tom-elliott I’m using “password”. As I said earlier, I’ve successfully done this in the past on our production server; that’s why I’m extra confused that it’s not working this time :-X…

                Tom ElliottT 1 Reply Last reply Reply Quote 0
                • Tom ElliottT
                  Tom Elliott @lmioperations
                  last edited by

                  @lmioperations The test was just to ensure that when you ‘reset’ to the password you could actually see a “change”

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  1 Reply Last reply Reply Quote 0
                  • Tom ElliottT
                    Tom Elliott
                    last edited by

                    Do you have more than one FOG Server hosting a DB? Maybe the one you’re changing it for is not the same as the one the GUI is trying to work from?

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    L 1 Reply Last reply Reply Quote 0
                    • L
                      lmioperations @Tom Elliott
                      last edited by

                      @tom-elliott I appreciate that you’re covering all the bases. The server that I have a WebUI page open for has an IP that matches the server that I’m SSH’d into right now.

                      Tom ElliottT 1 Reply Last reply Reply Quote 0
                      • Tom ElliottT
                        Tom Elliott @lmioperations
                        last edited by

                        @lmioperations THen is it possible there’s two databases? One that’s the “fog” database as expected, but another fog database with a different name? (So your server is looking at database fog_new where you’re resetting the gui password for database fog)?

                        Just trying to think of everything. I know the update statement works, I just tested it. So either the change simply isn’t taking.

                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        L 1 Reply Last reply Reply Quote 0
                        • L
                          lmioperations @Tom Elliott
                          last edited by lmioperations

                          @tom-elliott I just did a show databases; and this is the results:

                          mysql> show databases;
                          +--------------------+
                          | Database           |
                          +--------------------+
                          | information_schema |
                          | fog                |
                          | mysql              |
                          | performance_schema |
                          | sys                |
                          +--------------------+
                          5 rows in set (0.00 sec)
                          1 Reply Last reply Reply Quote 0
                          • Tom ElliottT
                            Tom Elliott
                            last edited by

                            Can you try:

                            UPDATE `users` SET `uPass` = MD5('password') WHERE `uName` = 'fog';
                            

                            I know you’re using 1.3 or higher, but the MD5 mechanism should work as well.

                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                            L 1 Reply Last reply Reply Quote 1
                            • L
                              lmioperations @Tom Elliott
                              last edited by lmioperations

                              @tom-elliott Let me know if I did this correctly (it looks like I did):

                              mysql> UPDATE `users` SET `uPass` = MD5('$2y$11$g0Hu8OaOStuPk7WWYGh6Wu4PLlZDZGOkzMwEEAk.rZMrI9IdDwno.') WHERE `uName` = 'fog';
                              Query OK, 1 row affected (0.00 sec)
                              Rows matched: 1  Changed: 1  Warnings: 0
                              

                              Was I supposed to use the ( and ) in that command?

                              I just tested my login again (“fog” as the username and “password” as the password), and got the same results 😞 (the login screen clears and there’s no message or error).

                              BTW, the “Changed: 1” is because I hadn’t changed/updated it since running the “test” earlier.

                              1 Reply Last reply Reply Quote 0
                              • S
                                Sebastian Roth Moderator
                                last edited by

                                @lmioperations No what Tom meant was to actually run the command exactly as he posted because the MD5() is a mysql function that does generate a hash from that string. So try:

                                UPDATE `users` SET `uPass` = MD5('password') WHERE `uName` = 'fog';
                                

                                And see if login works using password

                                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                L 1 Reply Last reply Reply Quote 1
                                • L
                                  lmioperations @Sebastian Roth
                                  last edited by

                                  @sebastian-roth Sebastian… I’m confused… I posted the exact command that I typed, and it DOES include “MD5()” with the password hash inside it. I did it correctly already, right?

                                  1 Reply Last reply Reply Quote 0
                                  • L
                                    lmioperations
                                    last edited by

                                    I think I may have found the problem! I’m kinda surprised nobody thought to try this! I just ran:

                                    mysql> select user from mysql.user;
                                    +------------------+
                                    | user             |
                                    +------------------+
                                    | fogstorage       |
                                    | debian-sys-maint |
                                    | mysql.session    |
                                    | mysql.sys        |
                                    | root             |
                                    +------------------+
                                    5 rows in set (0.00 sec)
                                    

                                    Notice there’s no “fog” user! This is especially confusing to me since I followed these instructions to a tee!:
                                    https://wiki.fogproject.org/wiki/index.php?title=Restoring_FOG_from_Backup

                                    1 Reply Last reply Reply Quote 0
                                    • Tom ElliottT
                                      Tom Elliott
                                      last edited by

                                      No, copy my command exactly. Not changing 'password' at all. Of course using the MD5 you could use any plain text.

                                      Right now, your password is set literally to:
                                      $2y$11$g0Hu8OaOStuPk7WWYGh6Wu4PLlZDZGOkzMwEEAk.rZMrI9IdDwno.

                                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                      L 1 Reply Last reply Reply Quote 0
                                      • L
                                        lmioperations @Tom Elliott
                                        last edited by

                                        @tom-elliott Ah, I get what you’re saying now, sorry 'bout that; my bad.

                                        OK, so I copied and pasted this (exactly) and here are the results:

                                        UPDATE `users` SET `uPass` = MD5('password') WHERE `uName` = 'fog';
                                        

                                        I just tried logging in with “fog” and “password”, but it still fails.

                                        Did you notice my post earlier where I said that I don’t see a “fog” user in the mySQL db?

                                        Tom ElliottT 1 Reply Last reply Reply Quote 0
                                        • Tom ElliottT
                                          Tom Elliott @lmioperations
                                          last edited by

                                          @lmioperations You’re not changing the fog user password for mysql. You’re changing the user that sits in fog.users

                                          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                          L Tom ElliottT 2 Replies Last reply Reply Quote 0
                                          • L
                                            lmioperations @Tom Elliott
                                            last edited by

                                            @tom-elliott Dang, this is getting more confusing :D.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            215

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project