• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Recreate Fog account

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    2
    3
    180
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Aero
      last edited by

      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,

      1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator
        last edited by george1421

        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.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        1 Reply Last reply Reply Quote 1
        • A
          Aero
          last edited by

          @george1421 said in Recreate Fog account:

          exit;

          george1421,

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

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          135

          Online

          12.1k

          Users

          17.3k

          Topics

          155.3k

          Posts
          Copyright © 2012-2024 FOG Project