sudo su
mysql -uroot -p (enter password for mysql)
use zabbix;
update zabbix.users set password=md5(‘enterpasswordhere’) where alias = ‘Admin’;
sudo su
mysql -uroot -p (enter password for mysql)
use zabbix;
update zabbix.users set password=md5(‘enterpasswordhere’) where alias = ‘Admin’;
If your mysql root user has no grant option on Ubuntu, here’s the procedure to fix this:
First you will have to start mysql without using the grant tables
sudo systemctl edit mysql
This will open an editor, add the following lines and save/quit the editor
[Service]
ExecStart=
ExecStart=/usr/sbin/mysqld --skip-grant-tables
Issue the following commands:
sudo systemctl daemon-reload
sudo systemctl start mysql
You can now connect to mysql using just the following command (without password)
mysql
Now change the user settings as follows:
mysql> UPDATE mysql.user SET Grant_priv = 'Y', Super_priv = 'Y' WHERE User = 'root';
Query OK, 0 rows affected (0.02 sec)
Rows matched: 1 Changed: 0 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.18 sec)
Now issue the first commands again (uptil the systemctl start mysql command), but remove the lines you’ve added to the mysql config.
I am installing openvas on kali linux. when starting openvas with gvm-start I get an error Job for ospd-openvas.service failed because the control process exited with error code. What is causing this and how to fix this ?
The cause of this is a permission issue on the openvas logs. The fix is quite easy:
chmod 666 /var/log/gvm/openvas.log
gvm-start
The problem should be fixed.
Open a terminal window and go to your MP3 folder. Run the following command (you might have to install eyeD3 first for our linux distribution.) :
eyeD3 *.mp3 --remove-all-images
Suppose you have a variable containing a directorypath:
#!/bin/bash
directorytouse="/home/myhome/whateverdirectory/"
If you try to test in your bash script if the directory exists, then it will fail because of the trailing slash:
if [ ! -d "${directorytouse} ]
then
echo -e "directory does not exist!"
fi
The easiest way to remove this / if it is present is to use shell parameter expansion:
if [ ! -d "${directorytouse%/}" ]
then
echo -e "directory does not exist!"
fi
This will get rid of the trailing slash if there is one. If there is no trailing slash present, then nothing will happen.
If you have ever used cat or tail to accidentally show a binary file, you will have noticed your terminal show graphical garbage instead of readable text. As shown in the screenshot below:
You will find several suggested fixes on the internet for this, including:
The only one that worked for me is entering the following (blindly, since you can ‘t read what your are typing) on the terminal prompt:
echo -e "\033c"
A good practice is to define an alias in your startup script with the following command:
alias resetterminal='echo -e "\033c"'
Next time you have this problem, you can then type (blindly) ‘resetterminal’ to fix the problem.
If your Vi or Vim session is hanging and is not responding to anything, then it might be because you pressed CTRL+S accidentally (out of habbit). To fix this, just press CTRL+Q to unblock the session.
If your wifi card is not available after booting your Dell XPS-15 laptop (with Ubuntu 20.04 or 22.04), or your external monitor refuses to display anything, please try the following:
start up your laptop without your power supply plugged in, connect with wifi, and/or your external monitor and only then plug in your power supply.
This fix works everytime for me.
If you want to reset your monitor settings to default through the terminal (your second screen is broken and the settings are ‘shown’ there and you don’t want to restart your laptop), you can use the following command:
xrandr -s 0
If you press CTRL-ALT-DEL on a Ubuntu Server the server will be shut down without asking any confirmation or password. This is of course not a good idea.
To disable this, enter the following commands as root:
systemctl mask ctrl-alt-del.target
systemctl daemon-reload