Author Archives: SoCRaT

About SoCRaT

Systems Engineer, OSS & Linux Geek

How to reset displays (monitors) settings for KDE Plasma and GNOME

Originally posted on Just Some Techie Notes!:
In case your display arrangement or settings, e.g. when you have 3 screens and you are for some reason unable to reorganize them or change their settings, just reset your display settings: For…

Posted in Linux | Leave a comment

What to do when an SSH session hangs because of a network problem

It’s a very basic post, yet still useful! Sometimes when you disconnect from a network or VPN or have any network connectivity problem in general that affects an established SSH connection to any of your servers, the terminal hangs for … Continue reading

Posted in Linux | Tagged , , | Leave a comment

How to reset root user password in MySQL 5.7+

Was too busy and haven’t written anything for quite a while! Anyway, here is how to reset the root user password in MySQL 5.7 and later in a nutshell! service mysql stop mkdir -p /var/run/mysqld chown mysql:mysql /var/run/mysqld mysqld_safe –skip-grant-tables … Continue reading

Posted in Linux, MySQL | Tagged , , , , | Leave a comment

Create a filesystem report with Python

In many cases, data accumulates over time, and a lot of this data is not being accessed at all, sometimes for years. Accordingly, it would be great if you could create a report that shows which data, the last access … Continue reading

Posted in Linux | Tagged , , , , | Leave a comment

Script to count number of logged in users to OpenVPN

To get that information you need to query your openvpn-status.log file, which usually resides in /var/log/openvpn/openvpn-status.log. A normal cat will show the following: OpenVPN CLIENT LIST Updated,Wed Mar 5 11:57:51 2019 Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since someuser,someip:55530,100686479,319036434,Tue Mar 5 … Continue reading

Posted in Linux | Tagged , , | Leave a comment