{"id":7400,"date":"2019-10-04T12:40:49","date_gmt":"2019-10-04T07:10:49","guid":{"rendered":"https:\/\/www.hiddentechies.com\/blog\/?p=7400"},"modified":"2019-10-04T15:27:31","modified_gmt":"2019-10-04T09:57:31","slug":"magento-2-create-edit-admin-user-command-line","status":"publish","type":"post","link":"https:\/\/www.hiddentechies.com\/blog\/magento-2\/magento-2-create-edit-admin-user-command-line\/","title":{"rendered":"Magento 2 &#8211; How to Create or Edit Admin User via Command Line"},"content":{"rendered":"<p>In this post I am going to explain how to create new admin user or edit existing user via command line in Magento 2<\/p>\n<p>Execute below command to create new admin user.<\/p>\n<pre class=\"lang:default decode:true \">php bin\/magento admin:user:create --admin-user='johndoe' --admin-password='john@123' --admin-email='johndoe@domain.com' --admin-firstname='John' --admin-lastname='Doe'<\/pre>\n<p>After successful execution of command you will get below message<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7401\" src=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/admin-user-created.png\" alt=\"Magento 2 - How to Create or Edit Admin User via Command Line\" width=\"876\" height=\"51\" srcset=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/admin-user-created.png 876w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/admin-user-created-300x17.png 300w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/admin-user-created-768x45.png 768w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/admin-user-created-800x47.png 800w\" sizes=\"(max-width: 876px) 100vw, 876px\" \/><\/p>\n<p>Note: If you are editing an existing admin user then only the first name, last name, and password can be edited.<\/p>\n<p>Command parameters and its values<\/p>\n<pre class=\"lang:default decode:true \">--admin-user -&gt;  Administrator user's username. (Required)\r\n--admin-password -&gt; Administrator user's password. (Required)\r\n--admin-email -&gt;  Administrator user's email. (Required)\r\n--admin-firstname -&gt; Administrator user's first name. (Required)\r\n--admin-lastname -&gt;  Administrator user's last name. (Required)<\/pre>\n<p>If you want to see all parameters then execute following command.<\/p>\n<pre class=\"lang:default decode:true \">php bin\/magento admin:user:create --help<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7402\" src=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/all-parameters-of-command.png\" alt=\"Magento 2 - How to Create or Edit Admin User via Command Line\" width=\"1324\" height=\"341\" srcset=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/all-parameters-of-command.png 1324w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/all-parameters-of-command-300x77.png 300w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/all-parameters-of-command-768x198.png 768w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/all-parameters-of-command-1024x264.png 1024w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/all-parameters-of-command-800x206.png 800w\" sizes=\"(max-width: 1324px) 100vw, 1324px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Now the following example updates first name, last name, and password of &#8220;johndoe&#8221; admin user.<\/p>\n<pre class=\"lang:default decode:true \">php bin\/magento admin:user:create --admin-user='johndoe' --admin-password='doe@999' --admin-email='johndoe@domain.com' --admin-firstname='John X' --admin-lastname='Doe X'<\/pre>\n<p>Thats it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post I am going to explain how to create new admin user or edit existing user via command line in Magento 2 Execute below command to create new admin user. php bin\/magento admin:user:create &#8211;admin-user=&#8217;johndoe&#8217; &#8211;admin-password=&#8217;john@123&#8242; &#8211;admin-email=&#8217;johndoe@domain.com&#8217; &#8211;admin-firstname=&#8217;John&#8217; &#8211;admin-lastname=&#8217;Doe&#8217; After successful execution of command you will get below message Note: If you are editing&#8230; <\/p>\n<div class=\"actions\"><a href=\"https:\/\/www.hiddentechies.com\/blog\/magento-2\/magento-2-create-edit-admin-user-command-line\/\">Continue Reading<\/a><\/div>\n","protected":false},"author":1,"featured_media":7408,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[10,27],"_links":{"self":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/7400"}],"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=7400"}],"version-history":[{"count":1,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/7400\/revisions"}],"predecessor-version":[{"id":7403,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/7400\/revisions\/7403"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media\/7408"}],"wp:attachment":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media?parent=7400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/categories?post=7400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/tags?post=7400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}