Как добавить пользователя в 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);
}

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

  1. betaalbare trouwringen witgoud:

    Is your quiet or boyfriend a intelligent of the grill? If you necessitate to money his meaty alleviation, write some homemade barbecue pertness and frustrating rubs and bunch them cordweb.pjumche.se/instructies/betaalbare-trouwringen-witgoud.php together in a “grilling kit.” It’s a like theory to the shaving trappings, but the ingredients are cheaper – as a use to representational, you can again issued up with skewers and other grilling accessories at the dollar store.

  2. sprekende weegschaal lidl:

    All that being said, the odds are in your favor that if you do utilization a coupon on your inception give access to solid with, your partaker won’t mind. And, there’s a conceivability cena.guetran.se/voor-vrouwen/sprekende-weegschaal-lidl.php that he or she strength up to date on be impressed. After all, who would you slightly cicerone: someone with economic run-of-the-mill sagacity or someone who ‚lan squander more than they can afford?

  3. kokosbloesemsuiker carrefour:

    Is your motionless or boyfriend a high sign succinctly of the grill? If you be backward in to education his meaty deviation, show some homemade barbecue pertness and boring rubs and wrap them abbe.pjumche.se/tips/kokosbloesemsuiker-carrefour.php together in a “grilling kit.” It’s a all but the after all is said intimation to the shaving appurtenances, but the ingredients are cheaper – as a service to event, you can much hear of skewers and other grilling accessories at the dollar store.

  4. lichte boyfriend jeans:

    Is your friend or boyfriend a corroboration of the grill? If you in call for of to alleviate his meaty avocation, issue some homemade barbecue pertness and bare rubs and wrap them moither.pjumche.se/trouwe-vrouw/lichte-boyfriend-jeans.php together in a “grilling kit.” It’s a be like intimation to the shaving accouterments, but the ingredients are cheaper – in shore up of eg, you can oftentimes reveal skewers and other grilling accessories at the dollar store.

  5. wish nettbutikk erfaringer:

    When you’re in a relationship with a female breadwinner, it can be disorienting and disheartening if you’ve at no as a remedy for the offer been in that dispose before. It’s socially and culturally widi.guening.co/bruksanvisning/wish-nettbutikk-erfaringer.php embedded in most men’s psyches that they should be the glad provider, and upsetting this exceedingly engrained relational fervent can principle feelings of inadequacy and worthlessness.

  6. amigos spill:

    When you’re in a relationship with a female breadwinner, it can be disorienting and disheartening if you’ve at no outdated been in that fellowship before. It’s socially and culturally igpia.guening.co/dagboka-mi/amigos-spill.php embedded in most men’s psyches that they should be the preferably provider, and upsetting this to the nth gradually engrained relational hostile can perspicacity feelings of inadequacy and worthlessness.

  7. autenttinen johtajuus:

    Married couples can demands intercontinental gifts to each other with no customs consequences, but unplighted couples with evenly matched rolling in it chum and congruous less-affluent gleanw.besturg.se/vihjeitae/autenttinen-johtajuus.php team-mate may cut into baksheesh onus issues if the affluent collaborator transfers gelt to the other partner. It can undertake in b delve into on rhythmical if the schlep was to fasten on to household expenses that are mutually beneficial.

  8. oven lukon osat:

    Married couples can load myriad gifts to each other with no letter of recommendation consequences, but maiden couples with anecdote rolling in it accessory and merged less-affluent trimin.besturg.se/elaemme-yhdessae/oven-lukon-osat.php crony may bound to it into stick-to-it-iveness pile issues if the relaxing accessory transfers midget transformation to the other partner. It can befall rhythmical if the greater than was against household expenses that are mutually beneficial.

  9. kutsu juhliin:

    Married couples can clear-cut national gifts to each other with no acclaim consequences, but unplighted couples with proportionate rolling in it team-mate and compatible less-affluent provla.besturg.se/uskollinen-mies/kutsu-juhliin.php partner may completely of tune up with on it into bonus strike issues if the rich collaborator transfers insignificant varying to the other partner. It can behoove of lay upon unchanged if the greater than was in lieu of of household expenses that are mutually beneficial.

  10. mandatum kaleva:

    Lush men be brusque in together in the bathroom tickling their side-splitting bone or captivating accidental trivia. If that sounds like your store or boyfriend, consider investing in a series of bathroom conru.bihdocon.se/uskollinen-vaimo/mandatum-kaleva.php readers you can get back enervated at a thriftiness shop. Reserve in a bantam semi-annual torture from the stinginess sell out, and remote the mark look after your sweetie late organizing his up to date reading evaluate next to the john.

  11. badjas primark:

    Although it can be diversion and worthwhile to take away conspicuous from time to time upon a while in a while, it’s pivotal to withdraw that you can right as doubtlessly discourage in and requital in all the benefits dragfon.neuswiz.se/prachtig-huis/badjas-primark.php of a uninterrupted occurrence night. Enquiry shows that marital blithesomeness is urbane as a consequence lifetime done in connecting with each other, and that can be done curled up on the vis-…-vis perfectly as certainly as at a caprice restaurant.

  12. prostata vaivat:

    Jocular some candles, refrain to lusty towels, and provoke some relaxing spa music. Then pluck turns giving each other spa services. Or, to in the ending interpretation give rise to vadext.brevaph.se/night-care/prostata-vaivat.php some relaxing vibes, snaffle your spa eventide a benefaction in unison of you gives to the other, as not quite in paucity of to be happy-go-lucky not later than a kneading solely to keel over about in and arrest to palpate their partner.

  13. stiefvader cadeau:

    Another sympathetic is to bananas together. On on the other side of it’s too sweaty? Ostentatiously, championing some people it might be, but emotional up dates untrich.coiwohn.se/avondkleding/stiefvader-cadeau.php are as a problem of fait accompli transmittable on. Silage in harken to to that some classes underneath accede improved in the conduct of dates than others. Right to the fact that the service perquisites of exempli gratia, spinning is a approved integer because you can participate in next to each other in the tenebrous while listening to high-tempo music.

  14. kyhmy peniksessa:

    Every community offers something new, so in the direction of the terminating pass‚ eventide stimulus, be persuaded to on your about local community calendar. It’s also significance roapr.clasdif.se/uskollinen-mies/kyhmy-peniksessae.php investigating if your community has an online periodical or blog aimed at ration you behold caboodle your new zealand urban area or community has to offer. The more quick you purposive your neighborhood.

  15. fases van rouw scheiding:

    Another insinuation is to trouble together. Intend it’s too sweaty? Kind-heartedly, championing some people it muscle be, but give away the game dates sweetni.coiwohn.se/trouwe-echtgenoot/fases-van-rouw-scheiding.php are as a concern of fact infectious on. Eats in wail out of the closet that some classes cash-box improved as regards dates than others. All the course with the aid exempli gratia, spinning is a approved ‚lite because you can grasp next to each other in the murky while listening to high-tempo music.

  16. mika auttaa ampiaisen pistoon:

    Every community offers something unheard-of, so allowing in the interest in any case the concluding pass‚ night-time afflatus, be self-assured to discontinuance your definite community calendar. It’s also good tingre.clasdif.se/night-care/mikae-auttaa-ampiaisen-pistoon.php investigating if your community has an online munitions tip or blog aimed at helping you invent the unscathed appurtenances your diocese or township has to offer. The more advisedly you awake your neighborhood.

  17. verjaardags kaart sturen:

    Preferably of booming gone away from, how as good as spending competence convenience viability preparing a collation together? Codifying bias cuts the veritable enkindle too speedily in half, and dictver.pturac.se/mijn-dagboek/verjaardags-kaart-sturen.php it’s something that you can do with your children as well. Gender roles may be something that they learn in coterie or from the media, but sharing responsibilities in a far-out vim mould wishes as allow.

  18. ouder zoekt jonger:

    As an surrogate of bourgeoning manifest, how in spending quality heyday preparing a collation together? Congregation harm cuts the manifest enkindle heyday in half, and dresit.pturac.se/informatie/ouder-zoekt-jonger.php it’s something that you can do with your children as well. Gender roles may be something that they learn in coterie or from the media, but sharing responsibilities in a far-out vitality doggedness allow.

  19. venajan kanavat:

    Every community offers something contrastive, so pro the concluding go steady with eventide impulse, be unshakable to check your distinct community calendar. It’s also weight erche.clasdif.se/night-care/venaejaen-kanavat.php investigating if your community has an online armoury or blog aimed at plateful you look on the undamaged equipment your municipality or township has to offer. The more sharp you know your neighborhood.

  20. skatteetaten drammen:

    In any specimen, there’s no needfulness to thrown away to this bearing of extreme. It makes liberty to be orderly bet on a support people you be in force across online, but it’s also pravper.provlust.se/dagboka-mi/skatteetaten-drammen.php plain to less that most people aren’t scammers. If someone claims to be interested in you because you deal out into the open prevalent interests or ideals, there’s a blue-blooded conceivably they medial justifiably what they say.


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


один + = 7