Fog WebUI Password Successfully Reset But Still Can't Login
-
Server
- FOG Version: 1.4.4
- OS: Ubuntu 16.04.2
Client
- Service Version:
- OS:
Description
I’m working through a restore on a test server that I built, and I followed all the instructions from here:
https://wiki.fogproject.org/wiki/index.php?title=Restoring_FOG_from_BackupEverything worked fine, and I rebooted the server just to be safe.
When I tried logging in to the WebUI, the login screen reset and there was no error message.
I followed the instructions here and successfully reset the password (and I verified that I had the hash typed exactly as it is in the document):
https://wiki.fogproject.org/wiki/index.php?title=Password_CentralI restarted mysql just in case and then tried logging in to the WebUI again, but the same thing happens; the username and password boxes clear and I’m not logged in (and there’s no message or anything indicating if my username and/or password were wrong).
At this point, I have no idea why this isn’t working because I’ve successfully done this on our production server when I needed to reset the password several weeks ago.
-
@tom-elliott You rock Tom! Thanks for the help man! : )
-
In chat requested @lmioperations edit /opt/fog/.fogsettings and remove the
packages
line. Then re-run the installer. All things seemed to point that mcrypt packages weren’t installed or enabled.After rerunning the installer @lmioperations is able to login to the GUI using the password as set.
-
@tom-elliott Capslock is definitely not on. You saw exactly what I pasted into the shell prompt (what you see in my previous post is what I copied straight out of my shell prompt from the server) :-X…
-
Are you sure caps-lock isn’t set and all. I know it seems stupid, but this doesn’t make sense.
What if you copy the word
password
and use the copy paste to the password field.
-
@tom-elliott Dang, this is getting more confusing :D.
-
@lmioperations You’re not changing the fog user password for mysql. You’re changing the user that sits in
fog
.users
-
@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?
-
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.
-
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
-
@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?
-
@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
-
@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.
-
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 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)
-
@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 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.
-
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?
-
@lmioperations The test was just to ensure that when you ‘reset’ to the
password
you could actually see a “change”
-
@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…