Hi guys,
I have a problem where the samba audit doesn’t work anymore. [root@dama bin]# /usr/bin/setsid /usr/bin/sudo /usr/libexec/nethserver/api/nethserver-samba/audit/update | jq DBI connect(‘smbaudit:localhost’,‘smbd’,…) failed: Access denied for user ‘smbd’@‘localhost’ (using password: YES) at /usr/bin/smbauditdbupdate.pl line 33. Cannot connect to database: Access denied for user ‘smbd’@‘localhost’ (using password: YES) at /usr/bin/smbauditdbupdate.pl line 33. error: error running non-shared prerotate script for /var/log/smbaudit.log of '/var/log/smbaudit.log ' {
*** “type”: “GenericError”,***
*** “id”: 1580906379,***
*** “message”: “generic_error”*** } [root@dama bin]#
Feb 05 13:08:29 dama.pdc.local systemd[1]: Starting MariaDB database server…
Feb 05 13:08:30 dama.pdc.local mariadb-prepare-db-dir[1334]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
Feb 05 13:08:30 dama.pdc.local mariadb-prepare-db-dir[1334]: If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
Feb 05 13:08:32 dama.pdc.local mysqld_safe[1608]: 200205 13:08:32 mysqld_safe Logging to ‘/var/log/mariadb/mariadb.log’.
Feb 05 13:08:32 dama.pdc.local mysqld_safe[1608]: 200205 13:08:32 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Feb 05 13:08:35 dama.pdc.local systemd[1]: Started MariaDB database server.
MariaDB is running
[root@dama ~]# service mariadb status
Redirecting to /bin/systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-02-05 13:08:35 -03; 51min ago
Process: 1607 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
Process: 1333 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 1606 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─1606 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─2988 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socke…
Feb 05 13:08:29 dama.pdc.local systemd[1]: Starting MariaDB database server…
Feb 05 13:08:30 dama.pdc.local mariadb-prepare-db-dir[1333]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
Feb 05 13:08:30 dama.pdc.local mariadb-prepare-db-dir[1333]: If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
Feb 05 13:08:32 dama.pdc.local mysqld_safe[1606]: 200205 13:08:32 mysqld_safe Logging to ‘/var/log/mariadb/mariadb.log’.
Feb 05 13:08:32 dama.pdc.local mysqld_safe[1606]: 200205 13:08:32 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Feb 05 13:08:35 dama.pdc.local systemd[1]: Started MariaDB database server.
Please use the new cockpit server-manager to work with samba audit. It has some fixes that make it behave well when you have a lot of entries in the logs.
If you still have problems, you have to drop the whole smbaudit database.