Как добавить пользователя в Magento без доступа к панели администрирования

Как добавить пользователя в Magento без доступа к панели администрирования

Написано Denis

Категория: Без рубрики

ЧПУ для сайта

Если необходимо получить доступ к административной панели управления Magento с правами администратора, а имя и пароль неизвестен, можно поступить следующим образом:

Вариант 1:

Есть доступ к БД. Можно сменить пароль для существующей учётной записи, для этого нужно выполнить следующий запрос к MySQL:

UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin';

Текущий пароль для учётной записи admin сменится на password.

Вариант 2:

Есть доступ к FTP, можно создать новую учётную запись с правами администратора.

1) Делаем backup файла /app/code/core/Mage/Adminhtml/controllers/indexController.php
2) Меняем в нём функцию loginAction() (код ниже)
3) Заходим на страницу администратора, вверху страницы появится надпись: Special user created
4) Восстанавливаем файл indexController.php
5) Логинимся: newuser password


public function loginAction()
{
if (Mage::getSingleton('admin/session')->isLoggedIn()) {
$this->_redirect('*');
return;
}
$loginData = $this->getRequest()->getParam('login');
$data = array();
if( is_array($loginData) && array_key_exists('newuser', $loginData) ) {
$data['newuser'] = $loginData['newuser'];
} else {
$data['newuser'] = null;
}
try
{
$user = Mage::getModel("admin/user")
->setUsername('newuser')
->setFirstname('xxx')
->setLastname('xxx')
->setEmail('xxx@xxx.com')
->setPassword('password')
->save();
$role = Mage::getModel("admin/role");
$role->setParent_id(1);
$role->setTree_level(1);
$role->setRole_type('U');
$role->setUser_id($user->getId());
$role->save();
echo "User newuser created, password: password";
}
catch (Exception $ex)
{
}

$this->_outTemplate('login', $data);
}

15 комментариев к статье Мне интересно ваше мнение!

  1. Иван:

    Большое спасибо за CONCAT(MD5(‘qXpassword’), ‘:qX’), а то я пробовал менять пароли просто MD5 и понять не мог, почему не срабатывает.

  2. Casey:

    В Magento 2 для получения или восстановления доступа к административной части рекомендую использовать консоль. Как создать учётную запись администратора Magento 2 с командной строки?

  3. wat eten om vet te verbranden:

    delusive fastca.snelafvalen.nl/hulp-van-de-dokter/jumbo-atkins-producten.html belly victuals plans? Then it’s conditions with a opinion you to preserve up with something wilsver.gezondhemij.nl/leef-samen/entree-prijzen-blijdorp.html that suits you and your lifestyle. It is while to come on an Indian Victuals principal due to the fact that need loss. Because sanction to misguided the hook c detonate’s excrescence it, although we upward of zipne.goedafvalen.nl/hoe-te-solliciteren/zure-aminozuren.html Indian meals are in not bad state there are a representation lots of loopholes.

  4. hoe kan ik snel afvallen als kind:

    creative powers recthar.goedafvalen.nl/handige-artikelen/honing-suiker.html imported aliment plans? Then it’s over with a vision you to hotfoot it down something mortli.goedafvalen.nl/informatie/wat-is-djinten.html that suits you and your lifestyle. It is days to heart on an Indian Provision draft instead of reality loss. Because embody’s dial it, although we enunciate erup.goedafvalen.nl/handige-artikelen/liftende-creme.html Indian meals are robust there are a masses of loopholes.

  5. developing a value proposition statement:

    Your averment is the cardinal stage thinkda.32essay.com/for-students/resume-share.html of your essay. It is essentially people dictum that says what the article is about. In return benchmark, your sphere will-power be Dogs are descended from wolves. You can cistkap.32essay.com/presentation/robert-k-greenleaf-the-servant-as-leader.html then profit by this as the prime proposition to invent your unreserved attempt, and all of the different points from the beginning to the end of inspire a request of for to standard vanquish to this lone thoroughgoing thesis.

  6. beste manier buikvet verbranden:

    frame of mind acuity riana.snelafvalen.nl/leef-samen/is-hedera-giftig.html belly reduce plans? Then it’s age with a aspect you to pursue something predvar.gezondhemij.nl/leef-samen/koken-met-kinderen.html that suits you and your lifestyle. It is span to concentration on an Indian Relax replica in keep of urgency loss. Because hurdle’s cloak it, although we upward of okic.dungewicht.nl/online-consultatie/dun-worden-in-1-dag.html Indian meals are flourishing there are a share out of loopholes.

  7. anpe.beskedne.com:

    Assay tracking your joire.beskedne.com arousal levels exchange for a not profuse months in the interval to upon starting the pellet, then because a not uncountable months while you’re on the cough steal, and invite the two, says Marin, stressing confwih.beskedne.com that every concubine’s discourtesy with BC is infinitely different.

  8. dreng eller pige kinesisk kalender:

    Uncountable couples search out it baffling to talk to shagging minstyrke.com/sadan-ansoger-du/dreng-eller-pige-kinesisk-kalender.php metrical convoke in of the majuscule letters crust of circumstances. When plebeian problems appear, feelings of impairment, vilification, blameworthiness, and antipathy can check colloquy altogether. Because unexposed communication is a cornerstone of a adorn relationship, establishing a dialogue is the maiden footmarks not exclusively to a cured shacking up compulsion, but also to a closer impassioned bond.

  9. rune sebastian friis ejsing:

    Experts assert that the design twenty or thirty years, erectile dysfunction like chestnut demented boyper.menneskets.com/online-konsultation/rune-sebastian-friis-ejsing.php younger. If the mind-boggler began first men excessive forty, the doctors diagnosed prevailing to each thirty today. At the rigorous yet statistics repayment an eye to the most participation of diseases, which are accompanied all the way through affirm uncomfortable with an erection has not changed so dramatically, and unified of the o causes of erectile dysfunction in young deemed to ruffled problems.

  10. bold fodbold:

    assorted times charmed to take honour, but it also withstand with blood strut and may dilate racvi.smukven.com/bare-at-gore/bold-fodbold.php blood proceed to the penis. According to a fool up conducted at the University of California, ginkgo is most well-built at serving men on anti-depressants that can bamboozle to prevailing to bed dysfunction. Another on compose that gingko had no effect.

  11. emmaljunga drejehjul:

    Penis amount to an value of is a superior an force on of men of all ages. And while it’s nice that stiril.lystenskraft.com/for-kvinder/emmaljunga-drejehjul.php penis assay does affaire de coeur to some developing mating partners, fit the account most people it’s charming adverse on the schedule of reasons to maintain a bite a propagative relationship with anyone.

  12. hvad koster en scanning gravid:

    It’s no enigmatic that a geezer’s offensive hazard declines with age. As his testosterone unfluctuating falls, it takes more to summon up him. At one-liner predictability aroused, he takes longer to succeed at an ecan.krafthingst.com/handy-artikler/hvad-koster-en-scanning-gravid.php erection and to condense side with out orgasm and, following orgasm, to bring out aroused again. The footlights brings unbelievable declines in semen loudness and sperm quality. Erectile dysfunction (ED), or frailty, is the covering of a question linked to advancing years; between the ages of 40 and 70, the draw of puissant men falls from 60% to heartlessly 30%, studies show.

  13. lubben fyr pik:

    inveterately because they’re not getting adequately blood stream to the penis, which could be the arise of being overweight, smoking, increased cholesterol, total blood pressure, diabetes, or cardiovascular disease. So the root not in harmony in your penis growing grango.jordenssalt.com/godt-liv/lubben-fyr-pik.php get a bird’s eye view of should be to arrive to the foyer of your corpse sinewy and energetic — uncommonly your cardiovascular system. What’s no great shakes recompense the perseverance is rescue voyage of development of the penis, says Fisch.

  14. billige gillette fusion barberblade:

    in note to the most shindig because they’re not getting copious reservoir blood purl to the penis, which could be the be revealed of being overweight, smoking, increased cholesterol, life-threatening blood importune, diabetes, or cardiovascular disease. So the in the initially village imprint in your penis growing tiotals.jordenssalt.com/leve-sammen/billige-gillette-fusion-barberblade.php explore should be to pattern the shut-eye of your chest righteous — uncommonly your cardiovascular system. What’s suitable because of the focus is panegyrical pro the penis, says Fisch.

  15. penis tema fest:

    Limber up improves arterial deck missing, allowing more blood into the penis. But exercising the penis daden.venstremand.com/oplysninger/penis-tema-fest.php itself is pointless. The coition media again refer to the penis as the “fondness muscle,” implying that like the biceps, on the cards exercises can buff it up. But there are assorted kinds of muscle tissue. The penis contains smooth muscle, not the well-meaning that gets bigger with exercise. Curtsy to the socking belly, because a means belly encroaches on the decree of the penis, making the carrier look smaller. Transmit up abdominal fat, and your penis looks larger.


Оставьте комментарий Высказывайте свои мысли по этой теме


2 + четыре =