Kerya techblog

Most Read Posts

  • Gentoo mail (postfix + postfixadmin + dovecot + amavisd-new + roundcube)
  • Zabbix - no such instance currently exists at this oid
  • LVM cant Boot - ALERT /dev/mapper/ubuntu--vg-root does not exist DROPPING to Shell -
  • liquidsoap-1.1.1 gentoo install
  • Laravel manual user register
  • Gentoo: php 5.6.0 + pecl-memcached 2.2.0 install script
  • Zabbix APC Smart UPS monitoring on FreeBSD with snmp
  • Squid 3.4 debian 7 install script
  • Подключение Foxgate S6224-S2 Ubuntu minicom
  • Abills
  • exim+dovecot+postfixadmin+clamav+spamassassin on FreeBSD
  • Openmeetings 2.1.1 Ubuntu 12.04.2 installation
  • libtool version mismatch pecl gentoo
  • Securing NTP
  • FreeBSD 9 ossec setup errors fix
  • fix for - corrupted record for package (pkgdep line without argument), ignoring
  • snmpd less verbose log FreeBSD (Connection from UDP messages)
  • Mikrotik no-ip ddns update script
  • Скопировать права mysql gentoo
  • mysql backup scripts
  1. Вы здесь:  
  2. Home
  • Home
  • Все статьи

Make user superadmin in zabbix

Подробности
Автор: Kirill
  • zabbix

Long story short:

You need to set type field in the users table to 3:

update users set type=3 where userid=66;

To change password in MySQL  (tested with 5.0 ):

update users set passwd=md5('mynewpassword') where alias='someuser';

 

 

dnf Error: unknown option

Подробности
Автор: Kirill

in /var/log/dnf.log :

Traceback (most recent call last):
 File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 573, in load
   ret = self._repo.load()
 File "/usr/lib64/python3.6/site-packages/libdnf/repo.py", line 397, in load
   return _repo.Repo_load(self)
RuntimeError: Unknown option

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 67, in main
   return _main(base, args, cli_class, option_parser_class)
 File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 106, in _main
   return cli_run(cli, base)
 File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 122, in cli_run
   cli.run()
 File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1038, in run
   self._process_demands()
 File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 741, in _process_demands
   load_available_repos=self.demands.available_repos)
 File "/usr/lib/python3.6/site-packages/dnf/base.py", line 405, in fill_sack
   self._add_repo_to_sack(r)
 File "/usr/lib/python3.6/site-packages/dnf/base.py", line 140, in _add_repo_to_sack
   repo.load()
 File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 580, in load
   raise dnf.exceptions.RepoError(str(e))
dnf.exceptions.RepoError: Unknown option
2024-02-27T17:10:37+0000 CRITICAL Error: Unknown option

Missing packages:

python3-librepo

librepo

Install/update:

wget https://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/Packages/l/librepo-1.14.2-4.el8.x86_64.rpm

wget https://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/Packages/p/python3-librepo-1.14.2-4.el8.x86_64.rpm

rpm -U python3-librepo-1.14.2-4.el8.x86_64.rpm  librepo-1.14.2-4.el8.x86_64.rpm

unpack pfx certificate (used for apache or nginx)

Подробности
Автор: Kirill

Openssl < 3 :

openssl pkcs12 -in star_site_net.pfx -clcerts -nodes  -out star_site_net.pem

openssl pkcs12 -in star_site_net.pfx -nocerts -nodes -out star_site_net.key

Openssl > 3 :

openssl pkcs12 -in star_site_net.pfx -clcerts -nodes -provider legacy -provider default -out star_site_net.pem

openssl pkcs12 -in star_site_net.pfx -nocerts -nodes -provider legacy -provider default -out star_site_net.key

 

Links:

https://www.entrust.com/knowledgebase/ssl/how-do-i-convert-a-pfx-to-be-used-with-an-apache-server

https://stackoverflow.com/questions/72598983/curl-openssl-error-error0308010cdigital-envelope-routinesunsupported

mysql audit plugin build script

Подробности
Автор: Kirill

Script tested on Rocky Linux 8.9 and mysql 8.0.36

export MYSQL_VERSION="8.0.36"
dnf install git cmake3 gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils gcc-toolset-12-annobin-annocheck gcc-toolset-12-annobin-plugin-gcc elfutils openssl-devel ncurses-devel libtirpc-devel patch automake libtool mysql-devel libudev-devel bison curl-devel python2 -y
dnf -y --enablerepo=powertools install rpcgen
scl enable gcc-toolset-12 bash
wget -q -N https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-boost-${MYSQL_VERSION}.tar.gz -O mysql-boost-${MYSQL_VERSION}.tar.gz
git clone https://github.com/trellix-enterprise/mysql-audit.git
cd mysql-audit
git checkout tags/v1.1.13
tar zxvf ../mysql-boost-${MYSQL_VERSION}.tar.gz
cd mysql-${MYSQL_VERSION}
cmake3 -DFORCE_INSOURCE_BUILD=ON -DWITH_BOOST=boost .

make -j`nproc --all` -C libservices
make -j`nproc --all` -C include

cd ..
perl -pi -e 's/TABLE_LIST/Table_ref/g' `grep -rlw TABLE_LIST include/ src/ offset-extract/`
cd src

patch --verbose --ignore-whitespace audit_handler.cc << EOF
--- audit_handler.cc    2024-01-24 17:19:37.247677405 +0000
+++ audit_handler.cc.2  2024-01-24 17:23:21.295862210 +0000
@@ -841,7 +841,7 @@
   const char *well_formed_error_pos = NULL, *cannot_convert_error_pos = NULL,
              *from_end_pos = NULL;
   copy_length = well_formed_copy_nchars(
-      &my_charset_utf8_bin
+      &my_charset_utf8mb4_bin
     , dest
     , dest_size
     , from_cs
@@ -1089,7 +1089,7 @@
 #if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100504
                                        &my_charset_utf8mb3_general_ci,
 #else
-                                       &my_charset_utf8_general_ci,
+                                       &my_charset_utf8mb4_general_ci,
 #endif
                                        query, qlen,
                                        col_connection, & errors);
EOF

cd ..

chmod +x bootstrap.sh
./bootstrap.sh
CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-${MYSQL_VERSION} --with-mysql-libservices=mysql-${MYSQL_VERSION}/libservices/libmysqlservices.a
perl -pi -e 's/automake-1.15/automake/g' pcre/Makefile
perl -pi -e 's/aclocal-1.15/aclocal/g' pcre/Makefile

alternatives --config python
make -j`nproc --all`

ls -la src/.libs

and finally: cp src/.libs/libaudit_plugin.so* /usr/lib64/mysql/plugin/

 

Issue and discussion:

https://github.com/trellix-enterprise/mysql-audit/issues/261

 One more mention:

https://dba.stackexchange.com/questions/330679/mysql-8-0-34-community-server-cant-open-shared-library-usr-lib64-mysql-plugin

 

  1. mysql dump one row
  2. redmine 5 docker-compose

Страница 2 из 17

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

Search

Older Posts

  • Greenbone Vulnerability Manager (GVM) hacks (63)
  • elasticsearch cluster red status fix due to high watermark (61)
  • ubuntu arrow keys misbehaviour fix (72)
  • icinga IIS monitoring powershell error Get-WmiObject : Invalid namespace "root\WebAdministration" (84)
  • Make user superadmin in zabbix (81)
  • dnf Error: unknown option (111)
  • unpack pfx certificate (used for apache or nginx) (116)
  • mysql audit plugin build script (290)
  • mysql dump one row (95)
  • redmine 5 docker-compose (199)
  • gitlab runner dind docker-compose (143)
  • AWS S3 IAM policy to limit to single sub folder (146)
  • logrotate hints (197)
  • bash script to clean files to required percentage (322)
  • Ansible create LVM and mount (732)

Login Form

  • Забыли пароль?
  • Забыли логин?
  • Регистрация