We’re sharing some example Bash scripts including backups and other methods to simplify the life of a System Administrator.

All HowTo's Ansible & Terraform Automation Linux Scripting in Bash Ubuntu, Mint & Debian Linux

Ansible To Get Linux OS Version Details

This article shows the Ansible playbook used to query target systems to get their version details. Ie, the details obtained from “/etc/*release”. — – hosts: all # remote_user: root # become: yes tasks: – debug: msg: – “ansible_distribution {{ hostvars[inventory_hostname].ansible_distribution }}” – “major version {{ hostvars[inventory_hostname].ansible_distribution_major_version }}” – “version {{

Read more
All HowTo's Cybersecurity Linux Scripting in Bash Ubuntu, Mint & Debian Linux

ClamAV – Find & Move Viruses, Exclude Directories & Notify of Infections

This article demonstrates how to find viruses on your Linux workstation or server, move the virus to a special directory and notify you if a virus was found. In addition, (as an example only) we don’t want to scan the “/var/lib/mysql” directory because that’s where our databases are so we’ll

Read more
All HowTo's Cybersecurity Linux Redhat, Fedora and CentOS Linux Scripting in Bash Ubuntu, Mint & Debian Linux Web Servers

Send SSH commands from PHP 5.6 (php56w)

This article explains how to send SSH commands (SSH, SCP, SFTP) to a remote server using php. In this example we have a working php56w installation with Apache. We’re using CentOS 7. SELinux is enabled. Download the libraries: https://sourceforge.net/projects/phpseclib/files/phpseclib1.0.5.zip/download Unzip the files into a new library directory: # Go to

Read more
All HowTo's Redhat, Fedora and CentOS Linux Scripting in Bash

OpenSSL urgent upgrade notice

The OpenSSL team have released an advisory to upgrade to version 1.1.0c. Read the notice here: “https://www.openssl.org/news/secadv/20161110.txt”. Redhat’s article can be found here: “https://access.redhat.com/security/cve/cve-2016-7054”. Severity: High TLS connections using *-CHACHA20-POLY1305 ciphersuites are susceptible to a DoS attack by corrupting larger payloads. This can result in an OpenSSL crash. This issue

Read more
Scripting in Bash

Simple Ping Monitor – Windows

Just a simple script thrown together to record the time and date of an outage on a server using ping from a Windows machine. You can view the data in Excel from this script if you set excel to separate the file using carriage returns. @ECHO OFF echo Monitoring Server

Read more
All HowTo's Cybersecurity Scripting in Bash

Email the SysAdmin a list of Available Updates daily

This is a one-liner to periodically send an email to the administrator with a list of available packages. /usr/bin/yum check-update | mail -s “Yum Updates Available – `hostname`” [email protected] You can put the above in a Cron job to have it report the list every day or whatever frequency you

Read more