• Hello All,

    I accidentally deleted all the contents of the users table when using phpmyadmin.
    Now I am unable to login the FOG Webgui, is there easy way recreating the fog account in the users table?
    Or provide me with command line to get the fog account back in the users table.

    Thanks,

  • Moderator

    I’m shooting from the hip here, but since the table is blank we can’t break it more.

    sudo mysql -u root -p fog
    

    Press enter for the password

    
    INSERT INTO users(uID,uName,uType,uAllowAPI) VALUES(1,'fog',0,1);
    
    UPDATE users SET uPass = MD5('password') WHERE uName = 'fog';
    exit;
    

    If the insert into doesn’t work then try this query instead

    INSERT INTO users(uName,uType,uAllowAPI) VALUES('fog',0,1);
    

    If its having an issue with insert into then I will need to look up the exact syntax, but it should be close.

    You should then reboot the fog server to flush the cached tables.


  • @george1421 said in Recreate Fog account:

    exit;

    george1421,

    That worked, back in business.
    Thank you very much for the assist.

  • Moderator

    I’m shooting from the hip here, but since the table is blank we can’t break it more.

    sudo mysql -u root -p fog
    

    Press enter for the password

    
    INSERT INTO users(uID,uName,uType,uAllowAPI) VALUES(1,'fog',0,1);
    
    UPDATE users SET uPass = MD5('password') WHERE uName = 'fog';
    exit;
    

    If the insert into doesn’t work then try this query instead

    INSERT INTO users(uName,uType,uAllowAPI) VALUES('fog',0,1);
    

    If its having an issue with insert into then I will need to look up the exact syntax, but it should be close.

    You should then reboot the fog server to flush the cached tables.

336
Online

8.2k
Users

15.0k
Topics

141.5k
Posts