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:
content/posts
astra-fly.mdhome-en-folders.mdip-command.mdlinux-krb5.mdlinux-network.mdlinux-nfs.mdlinux-packages-rebuild.mdlvm-base-commands.mdpfx-to-pem.mdpostgres-drop-db.mdpostgres-ldaps.mdpostgres-pro-astra-se.mdpostgres-replication.mdpostgres-simple-backup.mdpostgres-tls.mdpostgres-update.mdrdg-from-linux.mdreverse-shell-nc.mdruby-packer.mdselfsigned-to-trusted.mdssh-2fa-totp.mdssh-fail2ban.mdvmware-clipboard.mdvmware-restart-date.mdwindows-disable-shutdown.md
@ -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*
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user