OJS 3 Can't Login

Just installed a vanilla OJS 3, and created admin account. For some reason my admin credentials aren’t recognized. Fine, maybe i mistyped them. I go to reset my password, go through the hooplah of adding in the password field to the email template, get my new password, go to use that and it won’t work. How do I fix this?

Hi @Oneill381,

Did your admin username have a capital letter in it? Try entering it with all lowercase characters.

Regards,
Alec Smecher
Public Knowledge Project Team

Wait, what? The username isn’t case sensitive is it? I just logged in with all uppercase.

Hi @ctgraham,

This recently came up in the forum, leading to issue #1821. IIRC usernames were silently converted to lower case upon registration, but it may be that the login code for OJS 3.0 no longer does this, which is why it’s been encountered recently.

I tend to think of usernames like I think of code, which is probably not typical – would you expect them to be simply case insensitive? Or to force a lower-case only requirement on them? Or…

Regards,
Alec Smecher
Public Knowledge Project Team

Nope, no caps in my admin’s username. It does have a “-” in the middle. Would that make any difference?

Hi @Oneill381,

Would you mind testing to see whether a username without the dash permits you to login? Off the top of my head that should be OK, but if it proves to cause a difference, I can investigate further.

Regards,
Alec Smecher
Public Knowledge Project Team

Because I strongly support/encourage the option of emails as usernames, I believe that usernames should be case insensitive. This matches most of my personal login experiences, with the exception of one banking institution which requires case-sensitive and mixed char/numeric usernames.

Didn’t seem to make any difference, still can’t login

I have the same issue. The technical support team from where I buy hosting for installing OJS 3 does not recommend installing OJS 3 since it is still unstable (Is it right?). But, I ask their help to install it in my spanel. They did and gave me username and password. I cannot use them to login.

Hi @Oneill381 and @kawahyu,

One way to help debug this would be to manually set the password hash in the database. Try executing…

UPDATE users SET password=SHA1(CONCAT(username,'newPasswordHere')) WHERE username='usernameHere';

OJS supports a few ways of hashing passwords; this will use the older SHA1 hashing method. When you first log in after resetting the password this way, OJS will automatically upgrade the hash to a newer method.

If you’re able to log in exactly once after resetting the password this way, it’ll help identify the problem as the system’s support for the more modern hashing method.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks. Finally, I can login

Greetings,

When I was installing OJS3 on my own server all was ok. But when I had installed it on share hosting there was the problem with login. Unexpectedly my coworker couldn`t login with my credentials from another computer. And there was no errors shown. I have tried to change password from admin menu and from database and it did not work. From my PC all was OK.

From my point of view the OJS3 is stable but need some fairly easy updates for production use. And I think it is much better to deploy it on own server. Hosting companies are often take money for nothing :slight_smile:

Hi all,

Can someone confirm whether the password reset process above results in an account that will work across several login/logout cycles, or whether it only works once?

Regards,
Alec Smecher
Public Knowledge Project Team

I just ran it, and I was able to login, then it prompted me to update my password. I updated my password via the web interface, tried to login again, and no such luck

Hi @Oneill381,

What is the length of the password column in the users table in your database?

Regards,
Alec Smecher
Public Knowledge Project Team

The column itself allows up to 225. For the user in question, right now it’s at 0

Hi @Oneill381,

The password column is empty for that user? Can you confirm? Very interesting!

Regards,
Alec Smecher
Public Knowledge Project Team

Yup, confirmed, it’s empty there. Just has a 0 in the column

Hi all,

What version of PHP are you using?

Regards,
Alec Smecher
Public Knowledge Project Team

It looks like we’re using 5.3.3