Problems after upgrade mariadb

As you should know, there’s an important bug on TLS libs on every linux OS.
So upgrade is mandatory.
There’s also another little update in mariadb if you’re using it instead of mysql.
The problem is there, but not the indicator.

The problem in my case comes from the smtp server, I got the error:

535 5.7.8 Error: authentication failed: authentication failure

While tring to send an email (only sending, receiving works fine).
Looking in mail.log:

Mar  6 10:49:06 ciberterminal postfix/smtpd[29949]: warning: SASL authentication failure: Password verification failed
Mar  6 10:49:06 ciberterminal postfix/smtpd[29949]: warning: localhost.localdomain[127.0.0.1]: SASL authentication failed: authentication failure

Auth failed from SASL? WTF!
So i began debuging it:

/usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/saslauthd -r -n 1 -d -VVVVVVVVVV

But it only shows:

do_auth: auth failure: [user=dodger@ciberterminal.net] [service=smtp] [realm=ciberterminal.net] [mech=pam] [reason=PAM auth error]

Anything else.
Searching internet, I saw that post, I forgot to look for errors on auth.log!
Here it is:

Mar  7 10:48:41 ciberterminal saslauthd[4552]: PAM unable to dlopen(pam_mysql.so): /lib/security/pam_mysql.so: symbol make_scrambled_password, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link time reference
Mar  7 10:48:41 ciberterminal saslauthd[4552]: PAM adding faulty module: pam_mysql.so
Mar  7 10:48:41 ciberterminal saslauthd[4552]: DEBUG: auth_pam: pam_authenticate failed: Module is unknown
Mar  7 10:48:41 ciberterminal saslauthd[4552]: do_auth         : auth failure: [user=trian@ciberterminal.net] [service=smtp] [realm=ciberterminal.net] [mech=pam] [reason=PAM auth error]


That is a good information! Looking over internet, I saw more people with the same error.
But still not sollution for the problem.

So i decided to rollback the f***ing version of libmariadbclient/libmysqlclient to the previous version.
The problem?
There are no packages on the repo (on ANY mariadb repo across the net!!!):
apt-cache showpkg libmariadbclient18
Shows only actual version and in the official repo the previous version has been also removed.

Now what?
What about local cache?

root@ciberterminal:/home/dodger/mariadbrollback# find /var/cache/apt/archives/ -name "*libmariadb*"
/var/cache/apt/archives/libmariadbclient-dev_5.5.35+maria-1~wheezy_amd64.deb
/var/cache/apt/archives/libmariadbclient18_5.5.35+maria-1~wheezy_amd64.deb
/var/cache/apt/archives/libmariadbclient18_5.5.34+maria-1~wheezy_amd64.deb
/var/cache/apt/archives/libmariadbclient18_5.5.32+maria-1~wheezy_amd64.deb
/var/cache/apt/archives/libmariadbclient-dev_5.5.33+maria-1~wheezy_amd64.deb
/var/cache/apt/archives/libmariadbclient18_5.5.36+maria-1~wheezy_amd64.deb
/var/cache/apt/archives/libmariadbclient18_5.5.33+maria-1~wheezy_amd64.deb
/var/cache/apt/archives/libmariadbclient-dev_5.5.34+maria-1~wheezy_amd64.deb
/var/cache/apt/archives/libmariadbclient-dev_5.5.36+maria-1~wheezy_amd64.deb

AWWWWW YEAH!

So first, I save all the pkg’s:

mkdir mariadbrollback && cd mariadbrollback
  find /var/cache/apt/archives/ -name "*mysql*" -exec cp {} . \;
  find /var/cache/apt/archives/ -name "*maria*" -exec cp {} . \;
  find /var/cache/apt/archives/ -name "*libsasl2*" -exec cp {} . \;
  find /var/cache/apt/archives/ -name "*mailutils*" -exec cp {} . \;

Removing things:

root@ciberterminal:/home/dodger/mariadbrollback# apt-get remove libmariadbclient18                                                                                                                                                                                             
Leyendo lista de paquetes... Hecho
Creando arbol de dependencias       
Leyendo la informacion de estado... Hecho
Los paquetes indicados a continuacion se instalaron de forma automatica y ya no son necesarios.
  libaio1 libhtml-template-perl
Use 'apt-get autoremove' to remove them.
Los siguientes paquetes se ELIMINARAN:
  courier-authlib-mysql libdbd-mysql-perl libmailutils4 libmariadbclient-dev libmariadbclient18 libmysqlclient18 libpam-mysql libsasl2-modules-sql mailutils mariadb-client-5.5 mariadb-client-core-5.5 mariadb-server mariadb-server-5.5 mariadb-server-core-5.5
  postfix-mysql proftpd-mod-mysql python-mysqldb
0 actualizados, 0 se instalaron, 17 para eliminar y 2 no actualizados.
Se liberaran 126 MB despues de esta operacion.
¿Desea continuar [S/n]? 
(Leyendo la base de datos ... 70770 ficheros o directorios instalados actualmente.)
Desinstalando courier-authlib-mysql ...
Desinstalando mariadb-server ...
Desinstalando mariadb-server-5.5 ...
Stopping MariaDB database server: mysqld.
Desinstalando mariadb-client-5.5 ...
Desinstalando libdbd-mysql-perl ...
Desinstalando mailutils ...
update-alternatives: utilizando /usr/bin/bsd-from para proveer /usr/bin/from (from) en modo automatico
Desinstalando libmailutils4 ...
Desinstalando libmariadbclient-dev ...
Desinstalando mariadb-server-core-5.5 ...
Desinstalando mariadb-client-core-5.5 ...
Desinstalando python-mysqldb ...
Desinstalando proftpd-mod-mysql ...
Desinstalando postfix-mysql ...
Desinstalando libpam-mysql ...
Desinstalando libsasl2-modules-sql:amd64 ...
Desinstalando libmariadbclient18 ...
Desinstalando libmysqlclient18 ...
Procesando disparadores para man-db ...

Nothing work now xD
Don’t panic!

  dpkg -i ./libmariadbclient-dev_5.5.35+maria-1~wheezy_amd64.deb
  dpkg -i ./mariadb-client-core-5.5_5.5.35+maria-1~wheezy_amd64.deb
  dpkg -i ./mariadb-client-5.5_5.5.35+maria-1~wheezy_amd64.deb 
  dpkg -i libdbd-mysql-perl_4.021-1+b1_amd64.deb 
  apt-get -f install
  dpkg -i mariadb-server-core-5.5_5.5.35+maria-1~wheezy_amd64.deb 
  dpkg -i mariadb-server-5.5_5.5.35+maria-1~wheezy_amd64.deb
  apt-get -f install
  dpkg -i libmailutils4_1%3a2.99.97-3_amd64.deb 
  dpkg -i libpam-mysql_0.7~RC1-4+b3_amd64.deb 
  dpkg -i libsasl2-modules-sql_2.1.25.dfsg1-6+deb7u1_amd64.deb 
  dpkg -i mailutils*
  dpkg -i mariadb-server_5.5.35+maria-1~wheezy_all.deb 
  dpkg -i postfix-mysql_2.9.6-2_amd64.deb 

Why the “apt-get -f install”? I do it wrong with the installation steps, here is corrected, but if the installation fail, then the package will be “unconfigured” and you must execute the “apt-get -f” to correct it just after install all the deps.

With that steps, the problem should dissapear.

If your’re a purge-maniac, here you’ll find all the packages to solve the problem (at least in my case)

2 thoughts on “Problems after upgrade mariadb

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.