admin login failing in production environment

367 Views Asked by At

I have noticed one thing about BLC that is when I try to run admin module by setting environment as "development" it works fine. But if I change environment to "production" admin login fails with message "incorrect username and password".

My Setup: eclipse + tomcat 7 + MySQL

1

There are 1 best solutions below

0
On BEST ANSWER

If you are using broadleaf 3.1.x or 3.0.x - GA and demo site+admin

Because in production environment e different password encoder is used

password.admin.encoder=org.springframework.security.authentication.encoding.ShaPasswordEncoder
password.site.encoder=org.springframework.security.authentication.encoding.ShaPasswordEncoder

see core/runtime-properties/production-shared.properties

you need to change BLC_ADMIN_USER passwords

UPDATE `BLC_ADMIN_USER` SET `PASSWORD`='c25519e7c79bee0b21cb6f3636c4b08e1161a1f9' WHERE `ADMIN_USER_ID`='-1';
UPDATE `BLC_ADMIN_USER` SET `PASSWORD`='524cd27c55b237be4abab4bad9c30077e73e8095' WHERE `ADMIN_USER_ID`='-2';
UPDATE `BLC_ADMIN_USER` SET `PASSWORD`='c2e4e7387afbcada3f650e896f43bcd71846c09e' WHERE `ADMIN_USER_ID`='-3';
UPDATE `BLC_ADMIN_USER` SET `PASSWORD`='94870e2edbc43e860acb4f6455743c737492d62e' WHERE `ADMIN_USER_ID`='-4';
UPDATE `BLC_ADMIN_USER` SET `PASSWORD`='9d8155b591446b5f6e7d7bebae1401765f8988ae' WHERE `ADMIN_USER_ID`='-5';
UPDATE `BLC_ADMIN_USER` SET `PASSWORD`='efca1f2d13a506925e0e5721789ee3b9ed619204' WHERE `ADMIN_USER_ID`='-6';

those encoded passwords are for id as salt(-1,-2, ..) and admin as password.