1
0
mirror of https://github.com/fruworg/fruworg.github.io.git synced 2025-07-01 23:43:59 +03:00

little fixes

This commit is contained in:
2023-12-26 04:34:28 +06:00
parent 502633a0d5
commit 299a17db96
25 changed files with 113 additions and 49 deletions

@ -10,16 +10,18 @@ AD необходимо дать роль CA и выпустить сертиф
## Перенос сертификата
Необходимо перенести выпущенный конечный сертификат на сервер СУБД и перекодировать следующей командой:
```shell
```bash
openssl x509 -inform der -in <ad>.cer -out <ad>.pem
```
## Установка пакета ldap-utils
```shell
apt install ldap-utils -y
```
## Правка ldap конфига
В файл `/etc/ldap/ldap.conf` необходимо добавить следующие строки:
```config
@ -29,23 +31,26 @@ URI ldaps://<dc>.<domain>.<local>:636
```
## Проверка ldap
```shell
```bash
ldapsearch -x -b "dc=<domain>,dc=<local>" -H ldaps://<dc>.<domain>.<local>:636 -W -D <domain-user>
```
## Правка pg_hba.conf
С ldapprefix/ldapsuffix в файле `/var/lib/pgpro/std-14/data/pg_hba.conf`, возможно, придётся поколдовать. Стоит попробовать их оставить пустыми (="").
```config
host <database> <user> <ip>/<mask> ldap ldapserver=<dc>.<domain>.<local> ldapscheme=ldaps ldapprefix="cn=" ldapsuffix=",cn=users,dc=<domain>,dc=<local>"
```
## Создание пользователя в Postgres
```shell
```bash
psql -c "CREATE USER <domain-user>;"
```
## Перезапуск Postgres Pro
```shell
systemctl restart postgres*
```