eZ Community » Forums » Install & configuration » Regaining administrative access
expandshrink

Regaining administrative access

Regaining administrative access

Tuesday 18 February 2014 10:16:53 pm - 10 replies

I inherited an EzPublish instance and was given the admin account and password. I know they're right -- I get a different error when I log in wrong...when I log in I get:

ACCESS DENIED!

You do not have permission to access [site name]

I have root access to the mysql database. How do I regain admin access of the site?

Wednesday 19 February 2014 3:13:43 am

Are you working on the same server as the eZ installation or in a development environment?

Wednesday 19 February 2014 8:41:40 am

Can you use the forgotpassword functionality?  Change the email of the admin user in the ezuser table if need be.

If that doesn't work

The easiest way is to replace the password_hash for the admin user in the ezuser table.- if the password_hash_type is 2 then you can generate a new hash with:

 echo md5(<login>."\n".<password>);

Take a look at the createHash function of in the ezuser datatype and you'll see how to put the other ones together.

Modified on Wednesday 19 February 2014 8:45:47 am by Steven E Bailey

Wednesday 19 February 2014 3:20:43 pm

Quote from Steven E Bailey :

Can you use the forgotpassword functionality?  Change the email of the admin user in the ezuser table if need be.

If that doesn't work

The easiest way is to replace the password_hash for the admin user in the ezuser table.- if the password_hash_type is 2 then you can generate a new hash with:

 echo md5(<login>."\n".<password>);

Take a look at the createHash function of in the ezuser datatype and you'll see how to put the other ones together.

I did that already, just to sure that I had the right password.  I KNOW the password is right, as I've confirmed the hash and if I put it in wrong I get a different error: The system could not log  you in, make sure that the username and password are correct.

It's saying that I don't have access to the admin site.  

Wednesday 19 February 2014 3:24:32 pm

Quote from Betsy Gamrat :

Are you working on the same server as the eZ installation or in a development environment?

There are two separate servers, one with the eZ installation one with mySQL, all production, no dev.  The joys of inheritance...

Wednesday 19 February 2014 4:56:07 pm

Was it running when you got it?

I would start by looking in override/site.ini.append.php and checking the access method - whether it is hostname/url or port.  Then I would try those paths to check if they work.

Wednesday 19 February 2014 5:34:08 pm

Quote from Betsy Gamrat :

Was it running when you got it?

I would start by looking in override/site.ini.append.php and checking the access method - whether it is hostname/url or port.  Then I would try those paths to check if they work.

The site works, and the admin part used to let me in, I'm just getting the access denied error now.

Wednesday 19 February 2014 5:47:49 pm

Did you clear the cache? (With apologies if you already have)

Another thing you could check is /var/log/error.log

Since it is live, you could use debug by IP to get some information: http://damien.pobel.fr/post/some-tips-about-the-ez-publish-debug

Is it possible the admin user is in the wrong user group?

Wednesday 19 February 2014 7:24:54 pm

Quote from Betsy Gamrat :

Did you clear the cache? (With apologies if you already have)

Another thing you could check is /var/log/error.log

Since it is live, you could use debug by IP to get some information: http://damien.pobel.fr/post/some-tips-about-the-ez-publish-debug

Is it possible the admin user is in the wrong user group?

I found an article that said to check if it's in some tree node id 13, which it is...I think it is in the right group.

Can I clear the cache without logging in to back end?

Wednesday 19 February 2014 11:31:08 pm

Was the hash type changed in the ini file so you can't login because it's looking for the wrong hash?

Could it be that the MaxNumberOfFailedLogin was exceeded for the admin account (is that even possible)?

Has the admin user been changed from User ID 14?

Is there another admin account?

If you can access the command line you can clear the cache with:

php bin/php/ezcache.php  ---clear-all --purge

Thursday 20 February 2014 4:11:00 pm

Quote from Steven E Bailey :

Was the hash type changed in the ini file so you can't login because it's looking for the wrong hash?

Could it be that the MaxNumberOfFailedLogin was exceeded for the admin account (is that even possible)?

Has the admin user been changed from User ID 14?

Is there another admin account?

If you can access the command line you can clear the cache with:

php bin/php/ezcache.php  ---clear-all --purge

HEY! resetting the cache fixed it!

Thanks!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from