Can No Longer Login to Web GUI - Invalid Login (FOG 1.1.2/Ubuntu 14.04)
-
Hi all,
I am testing out FOG in my company environment. It’s not a pressing need, more a QOL upgrade for me and, as such, I’ve been sort of on-and-off testing it. I’m currently running FOG 1.1.2 on Ubuntu 14.04 Workstation 64-bit. The Ubuntu workstation is running on an ESXi host.
My problem is as follows: I am able to set up the FOG server initially with no problems. After installation, I am able to log into the Web GUI with the default user name and password. I then set up new user names and passwords for security purposes (defaults = sad face emoticon). I am able at that point to set up my images, register workstations, send commands, etc.
However, and this is the second run-through that I’ve encountered this, after a certain amount of time or one reset, going to the web GUI would suddenly prompt me with the Database Schema Installer/Updater prompt and, upon clicking, would fail that update. I found a forum post that gave a workaround for this – [URL=‘http://fogproject.org/forum/threads/problem-after-update.10985/page-2’]link here[/URL]-- where it was recommended that I had the following code to the /etc/init/mysql.conf file:
[FONT=Consolas]start on (net-device-up IFACE=eth0
and local-filesystems
and runlevel [2345])[/FONT]I did this and this resolved the Database Schema Installer/Updater issue-- I could now get the login prompt again. However, none of my user names or passwords now work. Every user name or password I give, from the default fog/password to [my fog username]/[my fog password] to fog/[my fog password] to [my fog username]/password, gives me an “Invalid Login” answer.
Note, my FOG server is still running properly in the background. I am able to PXE boot workstations, register them, etc. I just am not able to login to the Web GUI. I went into the MySQL settings and was able to confirm that [my fog username] was a user in the fog database, and I changed the password for that user successfully, but the new password STILL gave me “Invalid Login.” I’ve gone through some other forum posts with issues similar to (but not exactly the same as) mine and tried some of those troubleshooting steps to no avail.
NOTES:
[LIST]
[]I [I]did[/I] create a root password for the MySQL database upon installation. I can see that password in /var/www/fog/lib/fog/Config.class.php under db_settings and it is the correct password. I can use this root/password combination to log into the MySQL database successfully.
[]In my Apache error logs, I see the following four strings repeated:
[LIST]
[]“PHP Warning: MySQL::sqlerror(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 89, refer: [[url]http://[fogserver]/fog/management[/url]”
[]“PHP Warning: MySQL::sqlerror(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 180, refer: [[url]http://[fogserver]/fog/management[/url]”
[]“PHP Warning: MySQL::sqlerror(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 247, refer: [[url]http://[fogserver]/fog/management[/url]”
[]“PHP Warning: MySQL::sqlerror(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 247, refer: [[url]http://[fogserver]/fog/management[/url]”
[/LIST]
[]Yes, the error about line 247 repeats twice, then the error circles back around to line 89.
[]I have looked at /var/www/fog/lib/db/MySQL.class.php at the aforementioned lines and could see nothing strange about them, but I can provide them, or the whole file, upon request.
[/LIST] -
Did you by chance create a user named FOG?
Did you try resetting the password for the FOG user?
[code]
sudo passwd fog[/code]Make the password “password” as it should be and attempt to log in again.
-
This post is deleted! -
I did not create a user named Fog. I did change the default user’s name from fog to fog_admin. I tried resetting the Ubuntu machine’s user password for the account ‘fog’, which succeeded, but this did not resolve my login issue.
-
Why did you change the default username? Did you try changing it back to fog?
-
I always change default usernames in my environment, out of habit and for security purposes. I changed this account name within the Web GUI, so without access to the Web GUI I’m unsure how to change it back.
-
Hi,
rename the user in the db, install phpmyadmin (apt-get install phpmyadmin) login and rename the user:
[IMG]http://i.imgur.com/uRqteVW.png[/IMG]
Regards X23
-
Renaming the account did not work.
-
Any other suggestions? I already have a couple images saved to the server and would rather not start from scratch, but if I can’t figure this out, I guess that’ll have to be my solution.
-
I’m sorry, I’ve not tried to change my default user, I am trying to think of inventive ways to solve the issue. Please be patient.
-
Try this
You know what username you used?Do you know what type you entered it as?
FOG Uses MD5 encryption to the passwords to set the password. This way there’s kind of a level of security making cracking your passwords that much more difficult.
Try this:
[code]mysql -u root [ -p #only if you have a password for your database ] fog
select * from users WHERE uName=‘<YOURUSERNAMEHERE>’;
update users set uType=‘0’ where uName=‘<YOURUSERNAMEHERE>’;
update users set uPass=MD5(‘<YOURNEWPASSWORDHERE>’) WHERE uName=‘<YOURUSERNAMEHERE>’:[/code]Hopefully everything will work properly and you’ll be able to sign into your FOG system.