Ошибка authentication method 10 not supported

I’m trying to follow the diesel.rs tutorial using PostgreSQL. When I get to the Diesel setup step, I get an «authentication method 10 not supported» error. How do I resolve it?

Shepmaster's user avatar

Shepmaster

391k96 gold badges1113 silver badges1371 bronze badges

asked Oct 22, 2020 at 2:34

chasahodge's user avatar

3

You have to upgrade the PostgreSQL client software (in this case, the libpq used by the Rust driver) to a later version that supports the scram-sha-256 authentication method introduced in PostgreSQL v10.

Downgrading password_encryption in PostgreSQL to md5, changing all the passwords and using the md5 authentication method is a possible, but bad alternative. It is more effort, and you get worse security and old, buggy software.

answered Oct 22, 2020 at 6:04

Laurenz Albe's user avatar

Laurenz AlbeLaurenz Albe

211k17 gold badges207 silver badges266 bronze badges

8

This isn’t a Rust-specific question; the issue applies to any application connecting to a Postgres DB that doesn’t support the scram-sha-256 authentication method. In my case it was a problem with the Perl application connecting to Postgres.

These steps are based on a post.

You need to have installed the latest Postgres client.
The client bin directory (SRC) is «C:\Program Files\PostgreSQL\13\bin» in this example. The target (TRG) directory is where my application binary is installed: «C:\Strawberry\c\bin». My application failed during an attempt to connect the Postgres DB with error «… authentication method 10 not supported …».

set SRC=C:\Program Files\PostgreSQL\13\bin
set TRG=C:\Strawberry\c\bin

dir "%SRC%\libpq.dll"         # to see the source DLL
dir "%TRG%\libpq__.dll"       # to see the target DLL. Will be replaced from SRC

cp "%SRC%\libpq.dll" %TRG%\.

cd %TRG%
pexports libpq.dll > libpq.def 
dlltool --dllname libpq.dll --def libpq.def --output-lib ..\lib\libpq.a

move "%TRG%"\libpq__.dll "%TRG%"\libpq__.dll_BUP # rename ORIGINAL name to BUP
move "%TRG%"\libpq.dll "%TRG%"\libpq__.dll       # rename new DLL to ORIGINAL

At this point I was able successfully connect to Postgres from my Perl script.

The initial post shown above also suggested to copy other DLLs from source to the target:

libiconv-2.dll
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
libintl-8.dll

However, I was able to resolve my issue without copying these libraries.

answered Dec 19, 2020 at 16:58

VladZ's user avatar

VladZVladZ

613 bronze badges

1

Downgrading to PostgreSQL 12 helped

answered Dec 19, 2021 at 19:24

Michal Varyš's user avatar

Ошибка authentication method 10 not supported

К нам обратился клиент после самостоятельного обновления серверной платформы 1С и переходом на PostgreSQL 14 c проблемой создания базы – “authentication method 10 not supported”.

authentication method 10 not supported
authentication method 10 not supported

Данная ошибка связана с тем, что по умолчанию, в сборке PostgreSQL 1С, параметр “password_encryption” установлен в “scram-sha-256”, и в файле доступа pg_hba.conf аналогично.

Решение:

  1. В конфигурационном файле кластера postgresql.conf изменить параметр
    password_encryption = md5 # scram-sha-256 or md5
  2. В конфигурационном файле кластера pg_hba.conf изменить METHOD на md5
    Например:
    host all all 10.0.0.0/13 md5
    host replication all 10.0.0.0/13 md5
  3. Перезапустить кластер например pg_ctlcluster 14 main restart
  4. Обязательно обновить пароль в кластере
    psql -U postgres -c “alter user postgres with password ‘pa$$word’;”

authentication method 10 not supported

Модератор: Дмитрий Юхтимовский

authentication method 10 not supported

для новых PostgreSQL, при создании новой базы часто появляется ошибка — «authentication method 10 not supported», решается путем настройки PostgreSQL

Данная ошибка связана с тем, что по умолчанию, в сборке PostgreSQL 1С, параметр “password_encryption” в файле postgresql.conf установлен в “scram-sha-256”, и в файле доступа pg_hba.conf аналогично.
Для платформы, например, 8.3.21.1393 это не является проблемой, она работает и в режиме scram-sha-256.

Гилёв Вячеслав
 
Сообщений: 2726
Зарегистрирован: 11 фев 2013, 15:40
Откуда: Россия, Москва

решение

Сообщение Гилёв Вячеслав » 11 фев 2023, 01:20

В конфигурационном файле кластера postgresql.conf изменить параметр
password_encryption = md5 # scram-sha-256 or md5
В конфигурационном файле кластера pg_hba.conf изменить METHOD на md5
Например:
host all all 10.0.0.0/13 md5
host replication all 10.0.0.0/13 md5
Перезапустить PostgreSQL systemctl restart postgresql

Гилёв Вячеслав
 
Сообщений: 2726
Зарегистрирован: 11 фев 2013, 15:40
Откуда: Россия, Москва

Обязательно обновить пароль в кластере

Сообщение Гилёв Вячеслав » 11 фев 2023, 01:20

su — postgres
#Для PostgreSQL от 1С
/usr/lib/postgresql/14/bin/psql -E
#Для PostgreSQLPro
/usr/pgsql-14/bin/psql -E
alter user postgres with password ‘new_password’;

Гилёв Вячеслав
 
Сообщений: 2726
Зарегистрирован: 11 фев 2013, 15:40
Откуда: Россия, Москва


Вернуться в postgres и linux (deb-ные) для 1С

Кто сейчас на форуме

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1

I’m trying to follow the diesel.rs tutorial using PostgreSQL. When I get to the Diesel setup step, I get an «authentication method 10 not supported» error. How do I resolve it?

Shepmaster's user avatar

Shepmaster

391k96 gold badges1113 silver badges1371 bronze badges

asked Oct 22, 2020 at 2:34

chasahodge's user avatar

3

You have to upgrade the PostgreSQL client software (in this case, the libpq used by the Rust driver) to a later version that supports the scram-sha-256 authentication method introduced in PostgreSQL v10.

Downgrading password_encryption in PostgreSQL to md5, changing all the passwords and using the md5 authentication method is a possible, but bad alternative. It is more effort, and you get worse security and old, buggy software.

answered Oct 22, 2020 at 6:04

Laurenz Albe's user avatar

Laurenz AlbeLaurenz Albe

211k17 gold badges207 silver badges266 bronze badges

8

This isn’t a Rust-specific question; the issue applies to any application connecting to a Postgres DB that doesn’t support the scram-sha-256 authentication method. In my case it was a problem with the Perl application connecting to Postgres.

These steps are based on a post.

You need to have installed the latest Postgres client.
The client bin directory (SRC) is «C:\Program Files\PostgreSQL\13\bin» in this example. The target (TRG) directory is where my application binary is installed: «C:\Strawberry\c\bin». My application failed during an attempt to connect the Postgres DB with error «… authentication method 10 not supported …».

set SRC=C:\Program Files\PostgreSQL\13\bin
set TRG=C:\Strawberry\c\bin

dir "%SRC%\libpq.dll"         # to see the source DLL
dir "%TRG%\libpq__.dll"       # to see the target DLL. Will be replaced from SRC

cp "%SRC%\libpq.dll" %TRG%\.

cd %TRG%
pexports libpq.dll > libpq.def 
dlltool --dllname libpq.dll --def libpq.def --output-lib ..\lib\libpq.a

move "%TRG%"\libpq__.dll "%TRG%"\libpq__.dll_BUP # rename ORIGINAL name to BUP
move "%TRG%"\libpq.dll "%TRG%"\libpq__.dll       # rename new DLL to ORIGINAL

At this point I was able successfully connect to Postgres from my Perl script.

The initial post shown above also suggested to copy other DLLs from source to the target:

libiconv-2.dll
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
libintl-8.dll

However, I was able to resolve my issue without copying these libraries.

answered Dec 19, 2020 at 16:58

VladZ's user avatar

VladZVladZ

613 bronze badges

1

Downgrading to PostgreSQL 12 helped

answered Dec 19, 2021 at 19:24

Michal Varyš's user avatar

Здравствуйте, вопрос такой, брал тестовое решение, аля «POSTGRES 1C» в котором локали ru.RU и в 8.3.18.1363 1С он просто не хочет базу создавать, даже свою, через галочку,но при этом я коннекчусь. Проблема у них в локалях и почему-то другие выбрать «низя» и их попросту нет.
Подумал и поставил обычный postgres, но теперь не могу в локальной сети приконнектится к друг-другу.
psql 13.2 & 1c 8.3.18.1363
Попросту пишет «authentication method 10 not supported», причем все данные введены верно, в консоли я работаю и через PG тоже. службы также запущены(очевидно)

pg_hba

# TYPE DATABASE USER ADDRESS METHOD

# «local» is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all md5
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5

В самом конфиге стоит » * «
Возможно нужно установить какие-то дополнения к 1С «типа» ODBC или что-то такое ?
Я просто смотрел даже обычные ролики на YT и там делается все в два клика, но не у меня…)
upd: и да, это я делаю в форточке, на линукс не хотят люди переходить, слишком сложно им.

Понравилась статья? Поделить с друзьями:
  • Ошибка b0301 subaru impreza
  • Ошибка b0158 05 opel
  • Ошибка aura creator
  • Ошибка b0263 шевроле трейлблейзер
  • Ошибка b0149 ниссан