Skip to content
Advertisement

Can not INSERT INTO Postgresql

simplechan In other words, I installed a message board named simplechan, but I can not log in to a site dedicated to the administrator. Because you need a password to get there. I do not know the password.

I entered in psql as follows

JavaScript

In “simplechan/sql/create_table_query.sql” it was drawn as follows.

— tables for moderator things

create extension if not exists “uuid-ossp”; — this is only required for unique session_id.

JavaScript

And I tried it like this, but it was useless. I accessed “IP / mod_login” and entered my password, but I could not put it in.

JavaScript

When “password” is set to “md 5 _ password”, I properly INSERTed it. I accessed “IP / mod_login” and entered the password, but the password is incorrect. It was displayed. I confirmed it with “select * from moderator_list;” but it came in properly.

JavaScript

(1 row)

Advertisement

Answer

Instead of INSERTing the raw password you want to use, md5 hash it, and INSERT the result.

Find the hash of your desired password from the unix command line:

JavaScript

Since the md5 hash of mypassword is 34819d7beeabb9260a5c854bc85b3e44, from psql command line enter:

JavaScript

Then log in with a password of mypassword

To delete that username and password combination, from the psql command line enter:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement