Fog WebUI Password Successfully Reset But Still Can't Login
-
@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) andO
(uppercase O),l
(lowercase l) and1
(one) and more of those false friends…Please retry setting the
fog
user password in the DB and copy&paste this time! -
I copied and pasted it this time (here’s the results and proof):
When I try logging in, I still get the same results :-X…
-
@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.
-
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
-
@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'
-
@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…
-
@lmioperations The test was just to ensure that when you ‘reset’ to the
password
you could actually see a “change” -
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?
-
@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.
-
@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.
-
@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)
-
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.
-
@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.
-
@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
-
@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?
-
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 -
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.
-
@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?
-
@lmioperations You’re not changing the fog user password for mysql. You’re changing the user that sits in
fog
.users
-
@tom-elliott Dang, this is getting more confusing :D.