joshuaswarren / magescotch

A Magento 1 + Magento 2 ready development environment based on Scotch Box
55 stars 16 forks source link

Admin accoutn #26

Closed marticos closed 6 years ago

marticos commented 7 years ago

Actually the admin account is not:

Magento 2: http://192.168.33.10/magento2/admin_dev/ username: admin password: 64-solution-DISH-into-64

but:

Magento 2: http://192.168.33.10/magento2/adminpanel/

I don't even know username and password.

carsonreinke commented 6 years ago

Really lost on why this is wrong, but I had do this:

Using vagrant ssh, execute cd /var/www/html/magento1 && /usr/local/src/n98-magerun/bin/n98-magerun admin:user:change-password

jamespeerless commented 6 years ago

Yeah, I'm not able to access magento1/admin_dev (404). If I try to go to /admin it works but I cannot login. I also tried running admin:user:change-password and I still couldn't log in. Anyone figure this out?

jiadams commented 6 years ago

Hey,

I grappled with this issue for a while. After putting magento into dev mod, I finally got this error out the other end:

Warning: session_start(): Session data file is not created by your uid  in /var/www/public/magento1/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 134

#0 [internal function]: mageCoreErrorHandler(2, 'session_start()...', '/var/www/public...', 134, Array)
#1 /var/www/public/magento1/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(134): session_start()
#2 /var/www/public/magento1/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(223): Mage_Core_Model_Session_Abstract_Varien->start('adminhtml')
#3 /var/www/public/magento1/app/code/core/Mage/Core/Model/Session/Abstract.php(84): Mage_Core_Model_Session_Abstract_Varien->init('core', 'adminhtml')
#4 /var/www/public/magento1/app/code/core/Mage/Core/Model/Session.php(42): Mage_Core_Model_Session_Abstract->init('core', 'adminhtml')
#5 /var/www/public/magento1/app/code/core/Mage/Core/Model/Config.php(1357): Mage_Core_Model_Session->__construct(Array)
#6 /var/www/public/magento1/app/Mage.php(463): Mage_Core_Model_Config->getModelInstance('core/session', Array)
#7 /var/www/public/magento1/app/Mage.php(477): Mage::getModel('core/session', Array)
#8 /var/www/public/magento1/app/code/core/Mage/Core/Controller/Varien/Action.php(493): Mage::getSingleton('core/session', Array)
#9 /var/www/public/magento1/app/code/core/Mage/Adminhtml/Controller/Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch()
#10 /var/www/public/magento1/app/code/core/Mage/Core/Controller/Varien/Action.php(407): Mage_Adminhtml_Controller_Action->preDispatch()
#11 /var/www/public/magento1/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#12 /var/www/public/magento1/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /var/www/public/magento1/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#14 /var/www/public/magento1/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#15 /var/www/public/magento1/index.php(83): Mage::run('', 'store')
#16 {main}

Fatal error: Uncaught Exception: Warning: Unknown: Session data file is not created by your uid in Unknown on line 0 in /var/www/public/magento1/app/code/core/Mage/Core/functions.php:245 Stack trace: #0 [internal function]: mageCoreErrorHandler(2, 'Unknown: Sessio...', 'Unknown', 0, NULL) #1 {main} thrown in /var/www/public/magento1/app/code/core/Mage/Core/functions.php on line 245

This is likely related to this issue: #31

You can use a workaround of changing the session_save option in the /app/etc/local.xml from files to db.

From: <session_save><![CDATA[files]]></session_save> To <session_save><![CDATA[db]]></session_save>

Not sure of another workaround, as I'm unfortunately not versed enough to know how to create a custom location to save sessions that would be on the image and not on the nfs mounted files.

As for the issue with admin_dev, the magento image that is download reverts the admin panel to the default locations. If you want to change its location for some reason, in the same local.xml file change the frontName variable:

From <frontName><![CDATA[admin]]></frontName> To <frontName><![CDATA[admin_dev]]></frontName>

Or whatever you want the url to be.

uabassguy commented 6 years ago

I had to use admin:user:create to create a new admin user, the default password didn't work for some reason.

e.g. bin/magento admin:user:create --admin-user='admin2' --admin-password='!admin123!' --admin-email='info@domain.com' --admin-firstname='John' --admin-lastname='Doe'

joshuaswarren commented 6 years ago

I'm going to look into the session save issue via #31 - in the meantime, I'm adding a note to the readme file on how to create your own admin account as that will resolve this particular issue no matter the root cause.

kevincompton commented 5 years ago

This shouldn't be closed as the instructions for creating admin don't work for me.

@carsonreinke your method is the only one that works.