Skip to content

Commit

Permalink
fix #313 (#314)
Browse files Browse the repository at this point in the history
* Create .placeholder

fix #313

* Update INSTALL.md - Password encryption

fix #315
  • Loading branch information
necarnot authored Jan 8, 2024
1 parent 98f1b65 commit e608c8c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions doc/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,35 @@ In following commands replace `<you>` with your username.
1. `ALTER USER <you> WITH PASSWORD '<your_password>';`
1. `GRANT ALL ON SCHEMA public TO <you>;`

#### Password encryption
Downgrade password_encryption in PostgreSQL to md5, changing all the passwords and using the md5 authentication method:
1. In ``/etc/postgresql/16/main/pg_hba.conf` (your PostgreSQL version may vary), find the line
`host all all 127.0.0.1/32 scram-sha-256`
and replace the ending directive by md5:
`host all all 127.0.0.1/32 md5`
1. In `/etc/postgresql/16/main/postgresql.conf` (your PostgreSQL version may vary), find the line
`password_encryption = scram-sha-256`
and replace the value by `md5`.
1. Restart the postgresql service:
```bash
systemctl restart [email protected]
```
1. Check that the password of the dedicated user was actually converted to using md5:
```bash
su - postgres
$ psql -d freemap
psql (16.1 (Debian 16.1-1.pgdg120+1))

freemap=# select rolpassword from pg_authid where rolname = 'freemap';
rolpassword
-------------------------------------
md5e1cd775xjhdsfjkhdjdjfhj
```
You'll notice the heading md5 caracters of the encoded password.
In case this 3 caracters are missing, please reset the dedicated user's password:
```sql
ALTER USER freemap WITH PASSWORD 'somepassword';
```
### Import OpenStreetMap to database

Import [initial.sql](../sql/initial.sql) to PostgreSQL.
Expand Down
1 change: 1 addition & 0 deletions tiles/.placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit e608c8c

Please sign in to comment.