We’re sharing some example Bash scripts including backups and other methods to simplify the life of a System Administrator.
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
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
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
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
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
This post will show you how create a self contained machine that will backup your DVD collection without any effort from you (apart from placing the disc in the drawer). This is just a quick and simple script that was designed to help convert a 500+ strong collection of DVDs
Read more
This article will show two ways to test your SMTP server from the command line in Linux, these tests are very useful when setting up a new server and you just want to make sure you have it working before you continue on. Lets get started In this first example
Read more
Need some test files sure you could use the below method: touch file{“1″,”2″,”3”} But why do that when you could just let bash do the work for you and use the following: touch file{1..100} I don’t want blank files to test with, they need to have some data in them..
Read more
“My linux server is running so slow and it appears I am using all of my RAM what is going on?”. To which we reply “It’s a feature not a bug”. Linux is actually being smart and when it encounters a large file transfer (such as backing up large data
Read more
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