for some reason, a drupal 4.7.2 site that has worked for 9 months suddenly can't log in to the administrator account. (it's sat doing nothing for the past 6 months).

I'm not the person that set up the site, but I have the correct info - including full ftp, phpmyadmin access etc...

I've searched but can't find anything where the admin (user 1) can't log in...

any help would be very much appreciated.

Rod

Comments

modul’s picture

Are you logging in and are you refused, or don't you get the login block? That last one might be circumvented by http://yoursite.com/?q=user.
If nothing works, you could check with phpmyadmin in your drupal Users table, to see if you're still the user with uid no. 1.

Ludo

rodmartin’s picture

the login block was disabled. I tried logging in as ?q=admin (the user name) and I'm still getting Access denied. It's not even asking for a password.

I checked the phpmyadmin user table and confirmed that "admin" is the uid=1

I'm really boggled by this one...
thanks

modul’s picture

OK, a Very Risky Idea...

After having made a copy of the Users table (or better still, a backup of all your Drupal tables!!!), you could login as a new user, and then, in phpmyadmin, get rid of the original "Admin" user, and change the uid field for new user to 1. This is an idea, but I'm Not At All sure how dangerous it is. Some more experienced drupalist should give definitely give his opinion on this approach before you try it. And if you do, as I said, DO make a BACKUP of your tables...

That still doesn't explain how it happened, of course, but just maybe you could get into your system again.

Ludo

rcdwhat’s picture

I just wanted to say that I've been having the same problem for 3 weeks now. I'm not a developer, the site was built for me, but my developer has fallen off the face of the earth and left me with this MAJOR problem.

I can login, but as soon as I click on administer/create content or my account, I get the same access denied notice. All users are getting this message, not just admin.

I'm completely lost on this one. Hopefully something works to fix this, or at least somebody can find out WHY this is happening.

rodmartin’s picture

Ok...

so here's what i did.

I went to another drupal site i own (which is 5.1) and exported the user table from there.
Deleted the user table in the 4.7.2 version and imported the admin user from the 5.1 version.

from there, went to ?q=user and was able to reset the password by having it emailed to me.

whew...

thanks.

rcd - don't know if that will fix yours - mine was a little different than yours.
possibly clearing the domain cookies/cache also?

Rod

patrickmj’s picture

rcdwhat,

I've got the same problem on mine. I tried the approach suggested elsewhere of dropping the users table and importing the users table from another site I manage. Nada. Exactly as you say, I can log in, but can't get to anything. This is on a 4.7 site...is this happening on 5, too?

UPDATE:
More digging around came up with this:
http://drupal.org/node/20397#comment-177472

Worked perfectly!