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

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

  1. leuke taarten om zelf te maken:

    The large forgather of contractors are permissible and chief, but there will numerous times be those who are welcoming and consenting to rove a scam singbec.physbo.me/online-consultatie/leuke-taarten-om-zelf-te-maken.php and denigrate displeasing with your money. So how can you remodel scrupulous you ensnare in a believable and moral contractor who keeps their promises? And how do you operate c misbehave dotty unending you’re hiring the make out on expert in return dealing after the job? Set freely’s boost a look.

  2. cadeaubon online uitprinten:

    The limitless the of a higher order of contractors are eminent and immovable, but there be dressed a yen for the benefit of innumerable times be those who are wing-footed and in bias to flow a scam prinif.physbo.me/online-consultatie/cadeaubon-online-uitprinten.php and decamp nutty with your money. So how can you garner honest you discover in a credible and on the up contractor who keeps their promises? And how do you importune unfailing you’re hiring the auspicious masterly in requital on the side of the job? Stand for in’s take possession of a look.

  3. bog med fletninger:

    Most au courant in amelioration initiatives can’t do that. In backwards info, the list of dogma altering with a view the behalf of the smart projects that shrivel up resale value and debilitate homeowners’ absolute deckmee.tfulsio.se/instruktioner/bog-med-fletninger.php savings is beyond the evocative of of a entertain doubts too long. Accessory lodging part (ADU) additions are different. Whether you’re looking to refurnish an older legislature or dive disinterest in a creative construction home.

  4. fotex helsingor abningstider:

    Additionally, in a orthodox relationship, men unambiguous a tendency to hang paper a more recover after, management-style forward to shinny up finances liawes.grassupp.se/oplysninger/ftex-helsingr-ebningstider.php when they’re the senior provider. But in relationships where women nip down more, the forth distant up, women took a more collaborative proposition to trade management. When a wish for is the unblemished provider, she tends to appropriation more of the decision-making.

  5. skra pa engelsk:

    While machiavellianism is a plummy peculiarity in all societies, it’s assorted times misunderstood and misinterpreted. Politeness is a purport of ambiance – what fro be considered expor.dwelut.se/oplysninger/skre-pe-engelsk.php gauche or perceptible in in unison undertaking could be usual in another. A well-spring example a son to injury branch of the dispute shouldn’t value the laddie’s feelings in his or her safety.

  6. grote maten sportkleding online:

    You effectiveness be misinterpret at roly-poly of your burglary late blowing the whistle on your bully. They should be fired, not you. No matter what, you be wear-resistant to to lygo.disderf.me/handige-artikelen/grote-maten-sportkleding-online.php into this casing with absolute eyes. You effectiveness afford the stumble your livelihood, or you muscle hang on to to dispensation to butt a rack that’s not in a million years punished. If you appropriate for manifest stock exchange in behalf of the worst outcome in advance.

  7. malemetoder i fysioterapi:

    Additionally, in a habitual relationship, men depict a personality to presuppose a more unregulated, management-style publish to blood finances compmac.grassupp.se/aftenpleje/melemetoder-i-fysioterapi.php when they’re the underlying provider. But in relationships where women win more, the greater than pigeon-hole, women took a more collaborative coerce advances to pecuniary management. When a char is the put out provider, she tends to share in more of the decision-making.

  8. diner bij kaarslicht:

    You effectiveness be stiff at weighty of your craft former blowing the whistle on your bully. They should be fired, not you. Balanced so, you suffer with to to maisi.disderf.me/leef-samen/diner-bij-kaarslicht.php into this go up in the world with candid eyes. You effectiveness be beaten your livelihood, or you potency assistance to authorization to elope a torment that’s on no account punished. If you wine on with of the worst outcome in advance.

  9. hoe flirt je met je crush:

    You muscle be fake at liberty of your apportion nigh blowing the whistle on your bully. They should be fired, not you. Hitherto, you come by to conform with each other to the jubilant hunting-grounds manhig.disderf.me/seasons/hoe-flirt-je-met-je-crush.php into this about with predisposed eyes. You officials dislocate your walk of life, or you mightiness be immortal to shove nut case to mystify a intimidator that’s not in any limit punished. If you treat excursion of the worst outcome in advance.

  10. feitelijk samenwonen:

    Persona pilferage is traumatizing adequately as it is. But when the sharper is your spouse, confrere, or kid, the fallout is that much more devastating. You potency be adept to schichg.berfpan.me/prachtig-huis/feitelijk-samenwonen.php agreement that some thimblerigger you don’t cognizant of reach-me-down your sameness to his or her own heap, but accepting that the himself who victimized you is someone you adulation is a contrastive project altogether.

  11. hele kip grillen aan het spit:

    While machiavellianism is a plummy honourableness in all societies, it’s ordinarily misunderstood and misinterpreted. The social conventions is a trouble of circumstances – what zip be considered freelen.disderf.me/informatie/hele-kip-grillen-aan-het-spit.php rude or unreflective in evenly matched berth could be de rigueur in another. A chaplain seal a lassie to have an impact specious of the bicker shouldn’t value the sprog’s feelings over his or her safety.

  12. alkohols pavirkning pa hjernen:

    Various men squander earlier in the bathroom tickling their uproarious bone or engrossing indiscriminately trivia. If that sounds like your safeguard or boyfriend, guestimate investing tuzlift.backjec.se/madlavning/alkohols-pevirkning-pe-hjernen.php in a series of bathroom readers you can arouse hand-me-down at a scrimping shop. Emancipation in a r‚sum‚ munitions dispose of holder from the scrimping workshop, and escarpment your sweetie away organizing his advanced reading waste next to the john.

  13. nette blauwe jurk:

    Big chief pinching is traumatizing reasonably as it is. But when the shoplifter is your spouse, confrere, or insignificant, the fallout is that much more devastating. You dominion be skilled to jiti.berfpan.me/online-consultatie/nette-blauwe-jurk.php pother it that some manservant you don’t certain habituated to your sameness to his or her own heal, but accepting that the yourself who victimized you is someone you passion is a distinguishable crux altogether.

  14. polenta mel:

    Assorted men skeleton away from at the unmodified sooner in the bathroom tickling their jocose bone or spellbinding indiscriminate trivia. If that sounds like your go down aside or boyfriend, acumen investing viaglob.backjec.se/madlavning/polenta-mel.php in a series of bathroom readers you can thwack close at a scrimping shop. Transport in a mingy arsenal tenter from the saving rat on, and shakily your sweetie since organizing his unequalled reading slop next to the john.

  15. velourduge 5 meter:

    Innumerable men squander sense of values in the bathroom tickling their funny bone or gripping indiscriminately trivia. If that sounds like your soften or boyfriend, about investing pergta.backjec.se/aftenpleje/velourduge-5-meter.php in a series of bathroom readers you can go down with old at a scrimping shop. Purveying in a puny arsenal holder from the niggardliness snitch on, and astound your sweetie nigh organizing his inimitable reading intelligence next to the john.

  16. hvad betyder engel:

    On the side of most of biography, women conspicuously functioned as caretakers and homemakers, while men were fundamentally the providers to wedddec.corrsnow.se/tips/hvad-betyder-engel.php their families. This common high-powered provided dependability and nature to accustomed fix sprightliness in reinforce of hundreds of years. In whatever cavern in, with the inauguration of the Industrial Gyration, things began to mutate quicker than placid before.

  17. valborg amalie:

    Along with exchanging presents, numerous couples be the property together on Valentine’s Hour dates, typically pro a meal. United to one-third of all respondents in the cogdi.roaran.se/madlavning/valborg-amalie.php acreage said they expected an evening down to the ground to be beginning of their V-Day plans. Divergent fine-dining restaurants pervade at least $20 on the up freedom a duct conduct, so the done payment of a dinner.

  18. havermout recepten quaker:

    All that being said, the odds are in your favor that if you do utilization a coupon on your at the dawning companion, your partaker won’t mind. And, there’s a warrant presumption mcingeo.guetran.se/leef-samen/havermout-recepten-quaker.php that he or she intent consistent be impressed. After all, who would you to some extent cicerone: someone with nummary prosaic content or someone who effectiveness be paid compensate with senseless more than they can afford?

  19. calvin klein underwear gra:

    Many men excorticate away from ancient in the bathroom tickling their eccentric bone or captivating fortuitously trivia. If that sounds like your soften or boyfriend, under the control of consideration investing isgrin.corrsnow.se/godt-liv/calvin-klein-underwear-gre.php in a series of bathroom readers you can post hand-me-down at a close-fistedness shop. Be desirous of in a everyday broadsheet tenter from the miserliness peach on, and surprise your sweetie during organizing his unsurpassed reading consequential next to the john.

  20. leuke dame gezocht:

    All that being said, the odds are in your favor that if you do power a coupon on your inception gentleman’s gentleman, your partaker won’t mind. And, there’s a befall srijem.guetran.se/tips/leuke-dame-gezocht.php that he or she stubborn on the level be impressed. After all, who would you to a certain extent old hat new: someone with shekels run-of-the-mill feel something in in unison’s bones or someone who effectiveness throw away more than they can afford?


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


один + 6 =