Difference between revisions of "Reset WebUI FOG password"

From FOG Project
Jump to: navigation, search
m (tidied up the article a bit)
 
(Reset password: don't supply password on command-line, will be stored in history, mysql will prompt)
Line 6: Line 6:
 
On the FOG server where the MySQL "fog" database is installed, execute the commands:
 
On the FOG server where the MySQL "fog" database is installed, execute the commands:
  
*If the root user in MySQL does not have a password:
+
*If the root user in MySQL does ''not'' have a password (or it's stored in <tt>~/.my.cnf</tt>):
 
<pre>
 
<pre>
 
sudo mysql -u root fog
 
sudo mysql -u root fog
 
</pre>
 
</pre>
  
*If the root user in MySQL does have a password:
+
*If the root user in MySQL does ''have'' a password:
 
<pre>
 
<pre>
sudo mysql -u root -pROOTUSERPASSWORD fog
+
sudo mysql -u root -p fog
 
</pre>
 
</pre>
  

Revision as of 22:58, 16 March 2015

Overview

If somehow you lose access to the FOG server web interface, you can use the following procedure to connect to the MySQL database and reset the password for any existing FOG user. These user accounts and passwords are only for logging into the FOG server web interface and should not be confused with other fog users in the operating system.

Reset password

On the FOG server where the MySQL "fog" database is installed, execute the commands:

  • If the root user in MySQL does not have a password (or it's stored in ~/.my.cnf):
sudo mysql -u root fog
  • If the root user in MySQL does have a password:
sudo mysql -u root -p fog
  • Run this query to reset the password. You can change users other than "fog" by changing the uName value in the query.
UPDATE users SET uPass = MD5('password') WHERE uName = 'fog';
exit;

Login to the WebUI with:

  • Username: fog
  • Password: password (or whatever you used in the query above inside the MD5 call)