Enabling new user registration/disabling LDAP via DB

I am migrating an OJS 2.4.8 installation from an institutional server to a private server as they are sunsetting support for OJS. The institutional installation was using LDAP for account holders who were employees, and had turned off new user registrations. While I had an account on the institutional server, it was authenticated via LDAP and thus has no password in the db. With new registrations turned off, I can’t also just create a new account via the user interface.

I attempted to disable LDAP via the db (removing the ldap line from the auth_sources table), and thought a had enabled new registrations by setting “disableUserReg” in the journal_settings table to 0, but I still get the message that the journal (on our new private server) is not accepting registrations.

Any advice/insights would be greatly appreciated.

(BTW, once I can get this install working and verify the integrity of the data transfer, we’ll be upgrading to supported versions, but working through these issues first.)

Hi @blonsway,

I would have to double-check the details about LDAP, but if you want to set a password, check the encryption method in config.inc.php (the encryption parameter in [security]). It’ll probably be sha1. Then:

UPDATE users
SET password=sha1(concat(username, 'my-new-password'))
WHERE username='my-username';
  • Replace my-new-password with the new password
  • Replace my-username with the username
  • If your encryption algorithm is md5 rather than sha1, replace that too

Regards,
Alec Smecher
Public Knowledge Project Team

This worked perfectly! Thank you Alec!

1 Like

This topic was automatically closed after 9 days. New replies are no longer allowed.