Watch, Read, Listen
-
Use rsyslog omprog with a Python script
If you want to filter some specific logs and redirect them to another server or to another file, you can use the module provided with rsyslog called “omprog”. Thanks to that module, you can just ask rsyslog to execute a script on every logs you have from a specific application and process it with your…
-
Disable FIPS mode on CentOS 7
FIPS (Federal Information Processing Standard) can be enabled (by default or not) on linux kernels to enable the FIPS kernel cryptographic features.But in some case, this can also lead to some issues with openssl, or any cryptographic tool that you can use within any code. You can check if FIPS is enabled with that command:…
-
MacOS – “No mountable file systems” issue when mounting ISO file
If you try to mount an ISO file (like a Linux distribution) on MacOS and you get that weird error saying “No mountable file systems“: Then, you can easily find a workaround by using CLI. And now, the content of your iso file is available in /mnt/iso directory. To unmount the ISO file, just type:
-
MacOS – Prevent the automatic creation of a .DS_Store file on network drives
Mac OS X is automatically creating .DS_Store file as soon as you’re working on some network drives. This is used to store some custom attributes. If you want to prevent the OS to create those files automatically, follow the steps below: Once this is executed, the DS_Store files will only be created on local drives.
-
Add timestamp on each line of bash output
When analyzing the output of a bash script, it can be useful to prepend timestamp before each line to see how long it’s taking to do a specific action. For this, you can use the ‘ts‘ command: # echo -e “this\nis\na\ntest” | ts ‘[%Y-%m-%d %H:%M:%S]’ [2019-05-13 09:14:28] this [2019-05-13 09:14:28] is [2019-05-13 09:14:28] a [2019-05-13…
-
Apache/HTTPd Permissions are missing on a component of the path
Seeing that error in HTTPd/Apache logs when trying to GET some pages? (13)Permission denied: [client xxxxx]: access to /html/myfile.html denied because search permissions are missing on a component of the path This is because of some SELinux policies blocking the calls. If you don’t want to turn SELinux off, a simple workaround is: chcon -R…
-
Fix the NO_PUBKEY error with apt on Ubuntu
When updating or installing a package on a Debian-based distribution, you can face that alert: W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY C2518248EEA14886 This just means that a signing GPG key is missing or expired on your system. The error is giving…
-
Extract certificate and/or key from a PKCS12 file
The PKCS12 format is replacing the old PFX format from Microsoft. This format will allow storage of X.509 private keys and the associated public certificates in a single encrypted file. So you can extract the key and the certificate in a single common PEM file, you can use this openssl command: openssl pkcs12 -in myCertificate.pfx…
-
Automate apt update and keep current config files
When doing update on a Debian/Ubuntu server, if a package is trying to modify a config file, it’s asking for a manual choice. If you’re trying to try to automate the process, you’d probably like to get rid of that ask and keep the current config file by default. For that, you can use that…
-
Installing Oracle JRE using command line (no repo)
There is no way to easily automate deployment of Oracle JRE since there is no official repository for most of the linux distros. But there’s still a workaround to automatically download the JRE and install it locally on a server by using command lines. Here is an example of how you can download the JRE…