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 moreLatest Articles
Use Ansible to Add Users and their SSH public Keys on Multiple Linux Servers
This article demonstrates how to create an Ansible PlayBook that will add users to multiple Linux systems and add their public SSH key allowing them to login securely. Install Ansible on the host that you’ll use to target each of the Linux host you want the new users on. sudo
Read moreDetermine a WebServer type (Apache, IIS, etc)
You might be curious about what brand of web server a company is using to host their website. It’s simple to find out. This example is based on a Bank. Yes a bank, and one that’s using Windows servers for their Internet Banking login server. I’m not saying Windows servers
Read moreApache with LDAP authentication (Active Directory)
Apache has the ability to restrict access to websites (and sub directories within websites) based on users within Active Directory. Apache can also require that users be in a specific group. EG, if Sally exists in AD, she can log into the Apache served website. <VirtualHost *:80> <Location /> AuthBasicProvider
Read moreDump and Backup all MySQL Databases into their own files
This article demonstrates how to backup all MySQL databases into their own files and then tar the lot including system files. #!/bin/bash TO=”/root” FROM=”/etc /var/www/html /var/backups” DBUSER=”root” DBPASS=’MyPassword’ THISHOST=`hostname` DBLIST=`echo “show databases;” | mysql –password=$DBPASS -u $DBUSER | egrep -v ‘^Database$|^information_schema$|^mysql$’` for DBLOOP in `echo $DBLIST` do mysqldump -u $DBUSER
Read moreThe Safe way to remove a SymLink
There are two ways you can remove a symlink in Linux: rm ~/mySymLink Or the safe way: unlink ~/mySymLink Tip: Don’t add a trailing “/” to the end of the directory/link name.
Read moreResize multiple images/photos in seconds (OSX & Linux)
This article explains how to resize images on Linux and OSX. The link below is a great article for resizing many images/photos in one go. I’d argue it’s simpler on a Linux system but i digress. http://osxmactips.blogspot.com.au/2009/04/resize-multiple-pictures-at-once.html On a Linux system you can use the “convert” command which is part
Read moreShutdown or Reboot a Linux server 10 minutes from now
This article demonstrates how to tell a Linux server to shutdown or reboot in a set number of minutes or hours from now. For example, suppose you have a Linux server that needs a reboot for updates to apply but you want to go to lunch – and people are
Read moreRetention with Tar Backups
This article discusses how to keep the most recent 7 backups of a Linux system. When we say “we want x days of backups retention” we’re simply stating the number of days we can go back to retrieve files from the backups. Here is an example: /bin/tar -czf /media/backups/backup-$(date +%w).tgz
Read moreFirefox Vulnerability – Quick Update
Just a quick update to remind you that you should be updating Firefox in order to stay safe from the latest vulnerability which was announced on August 5th. This effects Windows and Linux so make sure that you update both. The current version for Firefox the contains the fix at
Read more