Synchronizing Time with NTP Using Ntpdate in Linux

The ntpdate command is a simple client for synchronizing the local system clock with a remote NTP server. It allows you to verify that your host has the correct time and, if necessary, synchronize the time with the NTP source. Although the ntpdate tool is deprecated, it is often used in simple cases where it is necessary to check the accuracy of the time on a Linux host or to manually synchronize the time once.

Continue reading “Synchronizing Time with NTP Using Ntpdate in Linux”

Creating a Self-Signed Certificate in Linux with OpenSSL

You can use self-signed certificates for internal use or testing of HTTPS web services. This means you don’t need to buy a certificate from a commercial CA or generate a free Let’s Encrypt certificate. This article describes how to use the OpenSSL tool to issue a self-signed certificate in Linux, bind it to the Nginx web server and add it to the trusted certificate list on the user’s computer.

Continue reading “Creating a Self-Signed Certificate in Linux with OpenSSL”

Linux: Compiling a Bash Script into Binary

Bash shell scripts in Linux are used in plaintext. Obfuscation allows you to hide a Bash script’s source code by compiling it into a binary. On Linux, you can use the shc tool to compile bash scripts. This tool can convert bash script code into C language and compile it. The output will be a binary file that can be run on almost any other Linux machine.

Continue reading “Linux: Compiling a Bash Script into Binary”

Monitor File or Directory Changes in Linux with Systemd

To track changes to the Linux file system and report changes to apps, the inotify kernel subsystem can be used. For example, when a file or directory is created, modified, read, or deleted, inotify allows a specific action (command, script) to be executed.

Continue reading “Monitor File or Directory Changes in Linux with Systemd”

Fix: apt-get – there is no public key available

An error may occur when updating the apt deb package manager cache on Linux (Ubuntu or Debian distros):

$ apt-get update

W: There is no public key available for the following key IDs: 467B942D3A79BD29
W: GPG error: https://repo.mysql.com/apt/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29

Continue reading “Fix: apt-get – there is no public key available”