Last active
July 1, 2021 16:34
-
-
Save magenx/81cfacae2854f9b6819b6b39da51b65a to your computer and use it in GitHub Desktop.
Revisions
-
magenx revised this gist
Mar 8, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ curl -o /usr/local/bin/magerun2 https://files.magerun.net/n98-magerun2.phar ## reset magento admin password MAGE_NEW_ADMIN_PASS="$(head -c 500 /dev/urandom | tr -dc 'a-zA-Z0-9!@#$%^&?=+_[]{}()<>-' | fold -w 15 | head -n 1)${RANDOM}" read -e -p "---> Enter admin old login: " -i "admin" MAGE_OLD_ADMIN_NAME read -e -p "---> Enter your First Name: " -i "Name" MAGE_NEW_ADMIN_FNAME read -e -p "---> Enter your Last Name: " -i "Lastname" MAGE_NEW_ADMIN_LNAME -
magenx revised this gist
Mar 8, 2020 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,20 +6,20 @@ curl -o /usr/local/bin/magerun2 https://files.magerun.net/n98-magerun2.phar ## reset magento admin password MAGE_NEW_ADMIN_PASS="$(head -c 500 /dev/urandom | tr -dc 'a-zA-Z0-9!@#$%^&?=+_[]{}()<>-' | fold -w 15 | head -n 1)${RANDOM}" read -e -p "---> Enter admin old login name: " -i "admin" MAGE_OLD_ADMIN_NAME read -e -p "---> Enter your First Name: " -i "Name" MAGE_NEW_ADMIN_FNAME read -e -p "---> Enter your Last Name: " -i "Lastname" MAGE_NEW_ADMIN_LNAME read -e -p "---> Enter admin login: " -i "admin" MAGE_NEW_ADMIN_NAME read -e -p "---> Enter admin email address: " -i "[email protected]" MAGE_NEW_ADMIN_EMAIL ## delete admin /usr/local/bin/magerun2 admin:user:delete ${MAGE_OLD_ADMIN_NAME} -f ## create new admin bin/magento admin:user:create --admin-user='${MAGE_NEW_ADMIN_NAME}' --admin-password='${MAGE_NEW_ADMIN_PASS}' \ --admin-email='${MAGE_NEW_ADMIN_EMAIL}' --admin-firstname='${MAGE_NEW_ADMIN_FNAME}' --admin-lastname='${MAGE_NEW_ADMIN_LNAME}' echo " > Magento admin login: ${MAGE_NEW_ADMIN_NAME}" echo " > Magento admin password: ${MAGE_NEW_ADMIN_PASS}" echo " > Magento admin email: ${MAGE_NEW_ADMIN_EMAIL}" -
magenx revised this gist
Mar 7, 2020 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,13 +6,15 @@ curl -o /usr/local/bin/magerun2 https://files.magerun.net/n98-magerun2.phar ## reset magento admin password MAGE_NEW_ADMIN_PASS="$(head -c 500 /dev/urandom | tr -dc 'a-zA-Z0-9!@#$%^&?=+_[]{}()<>-' | fold -w 15 | head -n 1)${RANDOM}" read -e -p "---> Enter admin old login name: " -i "admin" MAGE_ADMIN_OLD_NAME read -e -p "---> Enter your First Name: " -i "Name" MAGE_ADMIN_NEW_FNAME read -e -p "---> Enter your Last Name: " -i "Lastname" MAGE_ADMIN_NEW_LNAME read -e -p "---> Enter admin login name : " -i "admin" MAGE_NEW_ADMIN_NAME read -e -p "---> Enter admin email address : " -i "[email protected]" MAGE_NEW_ADMIN_EMAIL ## delete admin /usr/local/bin/magerun2 admin:user:delete ${MAGE_ADMIN_OLD_NAME} -f ## create new admin bin/magento admin:user:create --admin-user='${MAGE_NEW_ADMIN_NAME}' --admin-password='${MAGE_NEW_ADMIN_PASS}' \ -
magenx created this gist
Mar 7, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ #!/bin/bash ## get n98-magerun2 curl -o /usr/local/bin/magerun2 https://files.magerun.net/n98-magerun2.phar ## reset magento admin password MAGE_NEW_ADMIN_PASS="$(head -c 500 /dev/urandom | tr -dc 'a-zA-Z0-9!@#$%^&?=+_[]{}()<>-' | fold -w 15 | head -n 1)${RANDOM}" read -e -p "---> Enter your First Name: " -i "Name" MAGE_ADMIN_NEW_FNAME read -e -p "---> Enter your Last Name: " -i "Lastname" MAGE_ADMIN_NEW_LNAME read -e -p "---> Enter admin login name : " -i "admin" MAGE_NEW_ADMIN_NAME read -e -p "---> Enter admin email address : " -i "[email protected]" MAGE_NEW_ADMIN_EMAIL ## delete admin /usr/local/bin/magerun2 admin:user:delete admin -f ## create new admin bin/magento admin:user:create --admin-user='${MAGE_NEW_ADMIN_NAME}' --admin-password='${MAGE_NEW_ADMIN_PASS}' \ --admin-email='${MAGE_NEW_ADMIN_EMAIL}' --admin-firstname='${MAGE_ADMIN_NEW_FNAME}' --admin-lastname='${MAGE_ADMIN_NEW_LNAME}' echo " > Magento admin name: ${MAGE_NEW_ADMIN_NAME}" echo " > Magento admin password: ${MAGE_NEW_ADMIN_PASS}" echo " > Magento admin email: ${MAGE_NEW_ADMIN_EMAIL}"