{"id":20,"date":"2014-08-08T12:01:42","date_gmt":"2014-08-08T12:01:42","guid":{"rendered":"http:\/\/www.troliver.com\/?p=20"},"modified":"2014-08-08T12:01:42","modified_gmt":"2014-08-08T12:01:42","slug":"fog-update-part-3","status":"publish","type":"post","link":"https:\/\/www.troliver.com\/?p=20","title":{"rendered":"FOG Update &#8211; Part 3"},"content":{"rendered":"<h2>Recovering a deleted fog user &#8211; or &#8211; resetting a user&#8217;s password<\/h2>\n<p>Today is off to a frustrating start. I couldn&#8217;t log into the web UI anymore &#8211; it kept telling me I had an invalid password. I rembered a while ago that I had a problem with my username &#8211; it turns out that this was because I had deleted it when trying to rename it; however, here I had simply changed the password from the default (which is &#8216;password&#8217;!).<\/p>\n<p>I logged into the database and decided to check it out for myself to see what was going on. To do this, I just typed:<\/p>\n<pre>sudo mysql -u root -p fog<\/pre>\n<p>That prompts me for my password and opens up the &#8220;fog&#8221; database. You can then see all the tables using just SQL statements like SHOW tables; but make sure you add a semi colon afterwards (and not just because, here, it makes grammatical sense to).<\/p>\n<p>Anyhow, if I do a SELECT * from users; statement, it should show up all my users &#8211; and there should be two; one for quick imaging and one for my fog user.<\/p>\n<p><a href=\"http:\/\/www.troliver.com\/wp-content\/uploads\/2014\/08\/sql1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-21\" src=\"http:\/\/www.troliver.com\/wp-content\/uploads\/2014\/08\/sql1-300x46.png\" alt=\"sql1\" width=\"300\" height=\"46\" \/><\/a><\/p>\n<p>&#8230;and there isn&#8217;t. WHAT&#8217;S WRONG WITH YOU, FOG? I think I said that out loud, too. Ok, no big deal &#8211; we can just add another one. Because I can&#8217;t be bothered to type out too much, and beause the uId gets added automatically, I just want to insert a new user with the name &#8220;fog&#8221; and, to make sure it is a proper user that can do everything, I set the type to 0 (1 = the inability to do anything except for performing quick image tasks).<\/p>\n<p><a href=\"http:\/\/www.troliver.com\/wp-content\/uploads\/2014\/08\/sql2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-22\" src=\"http:\/\/www.troliver.com\/wp-content\/uploads\/2014\/08\/sql2-300x98.png\" alt=\"sql2\" width=\"300\" height=\"98\" \/><\/a><\/p>\n<p>Ok, so the user is back now &#8211; all I have to then do is update that user by setting the password to whatever I want (in single &#8216;quotes&#8217;) and encrypt it with MD5.<\/p>\n<p><a href=\"http:\/\/www.troliver.com\/wp-content\/uploads\/2014\/08\/sql3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-23\" src=\"http:\/\/www.troliver.com\/wp-content\/uploads\/2014\/08\/sql3-300x71.png\" alt=\"sql3\" width=\"300\" height=\"71\" \/><\/a><\/p>\n<p>And it works! I can log in again finally. Hopefully it won&#8217;t keep doing this &#8211; if so, I&#8217;ll write and rant more about it and see if I can figure out why!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recovering a deleted fog user &#8211; or &#8211; resetting a user&#8217;s password Today is off to a frustrating start. I couldn&#8217;t log into the web UI anymore &#8211; it kept telling me I had an invalid password. I rembered a while ago that I had a problem with my username &#8211; it turns out that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[2],"tags":[13,15,17],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6PQZ3-k","_links":{"self":[{"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/posts\/20"}],"collection":[{"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.troliver.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=20"}],"version-history":[{"count":0,"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/posts\/20\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.troliver.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.troliver.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.troliver.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}