Updating the Mint machines

I run this script for updates, it’s done well so far; #!/bin/bash # SRJ 2019-06-24 # Add the following to /etc/sudoers.d/Update # # Members of the sudo group can install software without giving their password # %sudo * = NOPASSWD: /usr/local/bin/apt, /usr/bin/apt-get, /usr/bin/dpkg # IAM=$(basename "$0") # Name of this script BaseDir="${HOME}/.DailyWork/" # Where to…

Another Random Password Script

I seem to do this sort of thing a lot. Start out by installing the dictionary of your choice, I prefer the ‘Large American’ with; sudo apt install wamerican-largesudo apt install wamerican-large Then, if it doesn’t exist, create a ~/bin directory and move into it; mkdir -p ~/bin cd ~/binmkdir -p ~/bin cd ~/bin And…

What kernel modules are changing

Start out by creating a little shell script to compare two runs of ‘lsmod’; #!/bin/bash # ~/bin/ModList File1=/tmp/ModList.a File2=/tmp/ModList.b # If there is no File1, create it [ ! -e ${File1} ] && lsmod > ${File1} # Always create File2 lsmod > ${File2} # Compare File1 with File2, results to the screen diff -i ${File1}…

Dell support for Linux is pretty sweet

This is what I see when I ssh to my Dell box at work; [sysadmin@nag ~]$ ssh steve@srj -i .ssh/SRJ Enter passphrase for key ‘.ssh/SRJ’: 1 device has a firmware upgrade available. Run `fwupdmgr get-upgrades` for more information. 3 updates can be applied immediately. 3 of these updates are standard security updates. To see these…

TinyPad.py

I’ve used this and variations of this script to generate random passwords for a long time, I originally wrote it in bash, because bash is best! #!/usr/bin/env python3 # SRJ 2019-08-07 import random import string msg = """ +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+ | In OpenOffice, format a page as ‘User’, Landscape, 3.37"x2.13", with .15" | | margins on…

Backing up files and databases

The files below are what I use to back up my machines, it’s quick, simple, and effective – I’ve used this for years to recover a lot of data, including bare-metal on more than one occasion. The files listed toward the bottom (Summary, Backups, and Filelist) are generated and don’t need to exist beforehand. /Backup/SiteWideBackup,…

Days between two dates

This little script reports back how many days fall between two arbitrary dates, or one date and today. If you put in a date in the future, it tells how many days as a negative; # How many days ’till Christmas? HowManyDays 2017-12-25 -115# How many days ’till Christmas? HowManyDays 2017-12-25 -115 #!/bin/bash # SRJ…

Simple Signal, Cheap

#!/usr/bin/python # 2009-05-03-09:00 SRJ # # This little circuit can be built into a # DB9 shell and used as a go/no signal on # an otherwise headless machine, it can # be turned on or off by any user in the # dialout group. A 3 lead Bi-Color LED # will also be able…

TinyPad

I’ve used this and variations of this script to generate random passwords for a long time, I recently re-coded this in Python because, well, Python! #!/bin/bash # SRJ 2017-02-06 cat <<EOF +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+ | In OpenOffice, format a page as ‘User’, Landscape, 3.37"x2.13", with .15" | | margins on all four sides. Select the text below…

Perfect_Printers

I wrote this a loong time ago, it amuses me to see that it still seems to work. The comments in this one make it pretty self-explanatory; #!/bin/sh # This gives a list of only the perfectly supported printers under Linux # It makes a nice list to take with you when you’re going to…