{"id":11885,"date":"2020-11-03T14:55:13","date_gmt":"2020-11-03T09:25:13","guid":{"rendered":"https:\/\/www.hiddentechies.com\/blog\/?p=11885"},"modified":"2020-12-07T18:25:12","modified_gmt":"2020-12-07T12:55:12","slug":"unlock-admin-user-via-command-line","status":"publish","type":"post","link":"https:\/\/www.hiddentechies.com\/blog\/magento-2\/unlock-admin-user-via-command-line\/","title":{"rendered":"Magento 2 &#8211; How to Unlock Admin User via Command Line"},"content":{"rendered":"<p>In this post I am going to explain how to unlock admin user via command line in Magento 2.<\/p>\n<p>First login to SSH panel and navigate to Magento 2 setup root.<\/p>\n<p>Run the following command. It will show usage of the command.<\/p>\n<pre class=\"lang:default decode:true \">php bin\/magento admin:user:unlock --help<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>Description:<\/strong><br \/>\nUnlock Admin Account<\/p>\n<p><strong>Usage:<\/strong><br \/>\nadmin:user:unlock &lt;username&gt;<\/p>\n<p><strong>Arguments:<\/strong><br \/>\nusername The admin username to unlock<\/p>\n<p><strong>Options:<\/strong><br \/>\n-h, &#8211;help Display this help message<br \/>\n-q, &#8211;quiet Do not output any message<br \/>\n-V, &#8211;version Display this application version<br \/>\n&#8211;ansi Force ANSI output<br \/>\n&#8211;no-ansi Disable ANSI output<br \/>\n-n, &#8211;no-interaction Do not ask any interactive question<br \/>\n-v|vv|vvv, &#8211;verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug<\/p>\n<p><strong>Help:<\/strong><br \/>\nThis command unlocks an admin account by its username.<br \/>\nTo unlock:<br \/>\n<strong>bin\/magento admin:user:unlock username<\/strong><\/p>\n<p>Syntax to Unlock Admin user:<\/p>\n<pre class=\"lang:default decode:true \">php bin\/magento admin:user:unlock &lt;username&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>For example, If you want to unlock a admin account with username &#8220;johndoe&#8221; then,<\/p>\n<p>php bin\/magento admin:user:unlock johndoe<\/p>\n<p><strong>Output:<\/strong><\/p>\n<p>&#8220;The user account &#8220;johndoe&#8221; has been unlocked&#8221;<\/p>\n<p>If the admin user was not locked then you will get below message.<\/p>\n<p>&#8220;The user account &#8220;johndoe&#8221; was not locked or could not be unlocked&#8221;<\/p>\n<div class=\"angwp_12010 _ning_cont _ning_hidden _ning_outer _align_center responsive\" data-size=\"custom\" data-bid=\"12010\" data-aid=\"0\" style=\"max-width:800px; width:100%;height:inherit;\"><div class=\"_ning_label _left\" style=\"\"><\/div><div class=\"_ning_inner\" style=\"\"><a href=\"https:\/\/www.hiddentechies.com\/blog?_dnlink=12010&t=1775808895\" class=\"strack_cli _ning_link\" target=\"_blank\">&nbsp;<\/a><div class=\"_ning_elmt\"><img decoding=\"async\" src=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/angwp\/items\/12010\/Banner-2.png\" \/><\/div><\/div><\/div><div class=\"clear\"><\/div>","protected":false},"excerpt":{"rendered":"<p>In this post I am going to explain how to unlock admin user via command line in Magento 2. First login to SSH panel and navigate to Magento 2 setup root. Run the following command. It will show usage of the command. php bin\/magento admin:user:unlock &#8211;help Output: Description: Unlock Admin Account Usage: admin:user:unlock &lt;username&gt; Arguments:&#8230; <\/p>\n<div class=\"actions\"><a href=\"https:\/\/www.hiddentechies.com\/blog\/magento-2\/unlock-admin-user-via-command-line\/\">Continue Reading<\/a><\/div>\n","protected":false},"author":1,"featured_media":12111,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[181,59,2138],"tags":[729,9,2153],"_links":{"self":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/11885"}],"collection":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/comments?post=11885"}],"version-history":[{"count":1,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/11885\/revisions"}],"predecessor-version":[{"id":11886,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/11885\/revisions\/11886"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media\/12111"}],"wp:attachment":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media?parent=11885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/categories?post=11885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/tags?post=11885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}