Upgraded to 1.2.10 but now I can't log in

Upgraded to 1.2.10 but now I can't log in

Postby KingKai on Mon Nov 15, 2010 11:28 pm

Hi,

I just completed an upgrade to 1.2.10 which was easier than I thought but when I try to log into the blog it doesn't recognize my credentials. Everything else seems to work fine though.

I tried the password recovery and it says that the username doesn't exist. When I check the MySql database I can see all the registered users and their e-mail addresses. I can even set the password with the "MD5" function. But I can still not log in. However, when I add a new user to the database using the MySQL tool provided by my hosting provider I can recover the password of that user. But I can't log in with it b/c it is not associated with any blog.

Any idea why I can't log in with any of the users that are already in the database.

Thanks,
Kai
KingKai
 
Posts: 12
Joined: Sat Nov 21, 2009 8:06 am
LifeType Version: 1.2.4

Re: Upgraded to 1.2.10 but now I can't log in

Postby italian_user on Tue Nov 16, 2010 5:47 am

Hi!

I'm not sure... if your username use Capital characters.... You have to do this:
To add A-Z to usernamevalidator in class/action/admin/adminloginaction.class.php file...
italian_user
 
Posts: 193
Joined: Mon Apr 03, 2006 1:37 pm
LifeType Version: 1.2.11

Re: Upgraded to 1.2.10 but now I can't log in

Postby KingKai on Tue Nov 16, 2010 1:16 pm

Thanks for the tip.

I found usernamevalidator in class/data/validator and changed the following:

define( "ONLY_ALPHANUMERIC_REGEXP", "^([a-z0-9]*)$" );
to

define( "ONLY_ALPHANUMERIC_REGEXP", "^([A-Za-z0-9]*)$" );

This removes the error message when I request a password reset e-mail. Once I got the e-mail I updated the password but when I try to log in with my new credentials I get the error "Sorry, you are not allowed to log in". This is different from the error I get when I use that user name and a random password. In that case I get "Sorry, Incorrect username or password."

It seems that the user I'm trying to log in with is blocked. Is there a way for me to unblock the user? Unfortunately I can't log in as admin either since I lost that password and the system doesn't allow me to request an admin password reset. But I do have access to the SQL database and can change what is entered there. I have yet to try changing the admin password in the SQL database.

Kai
KingKai
 
Posts: 12
Joined: Sat Nov 21, 2009 8:06 am
LifeType Version: 1.2.4

Re: Upgraded to 1.2.10 but now I can't log in

Postby Nomad on Tue Nov 16, 2010 6:46 pm

KingKai wrote:Thanks for the tip.

I found usernamevalidator in class/data/validator and changed the following:

define( "ONLY_ALPHANUMERIC_REGEXP", "^([a-z0-9]*)$" );
to

define( "ONLY_ALPHANUMERIC_REGEXP", "^([A-Za-z0-9]*)$" );

This removes the error message when I request a password reset e-mail. Once I got the e-mail I updated the password but when I try to log in with my new credentials I get the error "Sorry, you are not allowed to log in". This is different from the error I get when I use that user name and a random password. In that case I get "Sorry, Incorrect username or password."

It seems that the user I'm trying to log in with is blocked. Is there a way for me to unblock the user? Unfortunately I can't log in as admin either since I lost that password and the system doesn't allow me to request an admin password reset. But I do have access to the SQL database and can change what is entered there. I have yet to try changing the admin password in the SQL database.

Kai


the system doesn't see it like that ( or should'nt) the admin is just another user in essence and you should be able to use the reset password or forgotten password just the same as any other user. Look in your sql for user 1 (or sometimes 0) get there email and try it. it should work...
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Re: Upgraded to 1.2.10 but now I can't log in

Postby KingKai on Tue Nov 16, 2010 11:50 pm

Nomad wrote:the system doesn't see it like that ( or should'nt) the admin is just another user in essence and you should be able to use the reset password or forgotten password just the same as any other user. Look in your sql for user 1 (or sometimes 0) get there email and try it. it should work...


Now I reset the admin password in the SQL database and I was still not able to log in as admin.

I can also cut and paste the info from the user entry in the SQL database into the fields for the password recovery and it still does not work.

Kai
KingKai
 
Posts: 12
Joined: Sat Nov 21, 2009 8:06 am
LifeType Version: 1.2.4

Re: Upgraded to 1.2.10 but now I can't log in

Postby KingKai on Wed Nov 17, 2010 1:27 am

One more thing I tried:

When I installed the new version I renamed the old directory. That instance of lifetype (1.2.4) is pointing to the same MySQL database. And with this lifetype installation the one regular user that I have can log in. But the admin cannot log in either.

In that old installation I checked the permissions for that regular user and it is allowed to log in. I can also create a new user. That new user is then also able to log into the 1.2.10 copy of LifeType.

Kai
KingKai
 
Posts: 12
Joined: Sat Nov 21, 2009 8:06 am
LifeType Version: 1.2.4

Re: Upgraded to 1.2.10 but now I can't log in

Postby Nomad on Wed Nov 17, 2010 10:24 am

KingKai wrote:
Nomad wrote:the system doesn't see it like that ( or should'nt) the admin is just another user in essence and you should be able to use the reset password or forgotten password just the same as any other user. Look in your sql for user 1 (or sometimes 0) get there email and try it. it should work...


Now I reset the admin password in the SQL database and I was still not able to log in as admin.

I can also cut and paste the info from the user entry in the SQL database into the fields for the password recovery and it still does not work.

Kai


ok but why do it in the sql? it won't work in there anyway - (never has far as I know)..

What you should be using is the system password recovery or forgotten password option at login on the summary (or admin if you login that way).

Hopefully you saved the hash key that was in the password value in the sql?? Or at least have a copy of your sql backedup so you can revert?

the admin is the first user registered with the system. this will be user 1

goto your summary login option
click on forgot password
input user and e-mail address

when e-mail arrives simply reset the password

no need to even begin trying to do it in the sql and you can't simply just 'Edit' the value . Otherwise it would totally insecure...
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Re: Upgraded to 1.2.10 but now I can't log in

Postby KingKai on Wed Nov 17, 2010 11:00 am

Nomad wrote:ok but why do it in the sql? it won't work in there anyway - (never has far as I know)..

What you should be using is the system password recovery or forgotten password option at login on the summary (or admin if you login that way).


That's what I have been trying all along. But the system keeps telling me "The username is not correct, it is already in use, contains disallowed characters or it is too long (no special characters, no capitals, maximum 15 characters) " when I try to recover the password of the admin user

Hopefully you saved the hash key that was in the password value in the sql?? Or at least have a copy of your sql backed up so you can revert?


yes I backed up the SQL database which is why I'm not worried messing with it. And since the content of the SQL database looks very intuitive I was hoping to find the incorrect setting there that would allow me to enable log-in for both the admin and the regular user.

no need to even begin trying to do it in the sql and you can't simply just 'Edit' the value . Otherwise it would totally insecure...

[/quote]

I have been using this suggestion from the wiki: http://wiki.lifetype.net/index.php/FAQ# ... assword.3F


Is it possible to install a completely new LifeType instance, register the users I need and transfer all the actual content from the old database? This would also help with the spam comments that I'd like to leave behind.

Kai
KingKai
 
Posts: 12
Joined: Sat Nov 21, 2009 8:06 am
LifeType Version: 1.2.4

Re: Upgraded to 1.2.10 but now I can't log in

Postby Nomad on Wed Nov 17, 2010 5:26 pm

KingKai wrote:
Nomad wrote:Is it possible to install a completely new LifeType instance, register the users I need and transfer all the actual content from the old database? This would also help with the spam comments that I'd like to leave behind.

Kai


I'd say it's possible - will be a bit of work though to do it.

i.e. your going to have to ensure that all content for say user 1 is associated with user 1 and so on through your users.

OK This 'Might' work
personally what I would try is to register a new user
look in your sql for lifetype_users
there will be a value which says whether that user is an admin or not. Change that value so they are an admin (0 to 1)


once they have admin rights login with that user, change password of your original admin account and then delete the new account (Or if ye keep the password safe somewhere and it's secure - leave it dormant in case ye need it again)

I'm not saying this will work as I haven't tried it but it either will or it won't - could save ye a whole headache of work...
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Re: Upgraded to 1.2.10 but now I can't log in

Postby KingKai on Wed Nov 17, 2010 9:08 pm

Nomad wrote:OK This 'Might' work
personally what I would try is to register a new user
look in your sql for lifetype_users
there will be a value which says whether that user is an admin or not. Change that value so they are an admin (0 to 1)


I've already tried that and it didn't work.

Kai
KingKai
 
Posts: 12
Joined: Sat Nov 21, 2009 8:06 am
LifeType Version: 1.2.4

Re: Upgraded to 1.2.10 but now I can't log in

Postby KingKai on Wed Nov 17, 2010 9:25 pm

So I installed another LifeType instance and created a new SQL database for it. When I wanted to create the first user with the username "admin" I got this error: "User name is missing or incorrect ".

This seemed odd. So I changed the name to "superuser" and it worked. Why is "admin" as user name a problem?

Then I just went into the other database, changed the admin user name to "superuser" and was able to log in with it.

Now I have to see if everything works again.

Kai
KingKai
 
Posts: 12
Joined: Sat Nov 21, 2009 8:06 am
LifeType Version: 1.2.4

Re: Upgraded to 1.2.10 but now I can't log in

Postby Nomad on Thu Nov 18, 2010 6:29 am

KingKai wrote:So I installed another LifeType instance and created a new SQL database for it. When I wanted to create the first user with the username "admin" I got this error: "User name is missing or incorrect ".

This seemed odd. So I changed the name to "superuser" and it worked. Why is "admin" as user name a problem?

Then I just went into the other database, changed the admin user name to "superuser" and was able to log in with it.

Now I have to see if everything works again.

Kai



Probably because Admin is a blocked username - check in your settings under Administration/Summary - it's blocked to stop users from signing up with that user name. So you can't also install under that username either...

Strange though that it won't send you a forgotten password mail for the admin user though - would have thought it would
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Re: Upgraded to 1.2.10 but now I can't log in

Postby KingKai on Thu Nov 18, 2010 10:21 am

Nomad wrote:Probably because Admin is a blocked username - check in your settings under Administration/Summary - it's blocked to stop users from signing up with that user name. So you can't also install under that username either...


And I assume that that is something that changed between 1.2.4 and 1.2.10.

Kai
KingKai
 
Posts: 12
Joined: Sat Nov 21, 2009 8:06 am
LifeType Version: 1.2.4

Re: Upgraded to 1.2.10 but now I can't log in

Postby jondaley on Mon Nov 22, 2010 10:29 am

Yes, somewhere along the way (maybe 1.2.8 or so) the username validator actually looked at the invalid usernames to block them. I am not sure why the default blocked usernames contain "admin", that seems like a likely username that people would want to use. I think that default has been removed in the current version, though I'll have to check that. But, for any old sites that currently block the admin (or any other) username, they will no longer be able login with those usernames.

You can either change the username, or remove it from the invalid list, on the SQL side. You probably will need to erase the tmp/cache* directories when making SQL changes behind the scenes.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch


Return to Configuration and Installation