postgresql passwordcheck.so: undefined symbol : plain_crypt_verify

87 views Asked by At

i'm tring to add shared_preload_libraries='$libdir/passwordcheck' on postgresql.conf. the version is 9.2.13 and there's no passwordcheck module in this version. so i brought passwordcheck.so from 12 version to 9.2.13 verion in $libdir but when i try to restart server, there's a message below like this. could not load library "/usr/lib64/pgsql/passwordcheck.so": undefined symbol : plain_crypt_verify

how should i solve it? and when i checked by using "ldd passwordcheck.so" it was successful

also, i would like to compile againg after i get extensions from new verison. but the postgresql installed in server, it's not installed by source. it's installd by using command "sudo apt-get install postgresql" so i cannot recompile

$ ./pg_ctl -D /home/postgres/pgsql/data start
server starting
$ FATAL:  could not load library "/home/postgres/pgsq/lib/passwordcheck.so": /home/postgres/pgsq/lib/passwordcheck.so: undefined symbol: plain_crypt_verify

1

There are 1 answers

1
Laurenz Albe On

You cannot use a PostgreSQL library with a different major version than what it was built for. You'd have to build the library for PostgreSQL 9.2.

But my advice is not to touch that software, except to update to 9.2.24 and to upgrade to a supported PostgreSQL release.

Note that the passwordcheck extension cannot be used to enforce password complexity rules, since the client can hash the password before sending it to the server.