Posted on October 18, 2019, 2:23 PM, by Mike Diehn, under
SysAdmin.
In Unix and Linux, times are stored as seconds since the Unix Epoc, 1970-01-01 00:00:00. Spreadsheets often use a different Epoc and they tend to store days instead of seconds. When I import timestamped data that came from Unix land, I have to compensate for those differences. First, I format two cells to YYYY-MM-DD HH:MM:SS […]
Posted on May 15, 2018, 2:08 PM, by Mike Diehn, under
SysAdmin.
This awk will print out the numbers missing in an ordered sequence that starts with the number you set “a=” to in the BEGIN block. awk ‘BEGIN {a=1} { while (a++ < $1) {print a-1} }' For example, here I have a few calls to seq create a sequence of integers starting at 1 and […]
Posted on September 29, 2017, 11:13 AM, by Mike Diehn, under
SysAdmin.
I made this up this morning and I think it doesn’t suck. I put it in my .bash_aliases file, which is read by my .bashrc and then I have them on the command line: mkpass_string() { BOFS=${1:-Get} EOFS=${2:-Clue} SEPS=$(rand –mask ‘,.-=*_+^@’ -N 2 -d ” ) rand -M 99 -N 2 –bof “${BOFS}” -d “${SEPS}” […]
Posted on June 21, 2017, 11:36 AM, by Mike Diehn, under
SysAdmin.
I’ve had to do this a few times and I always forget and have to learn again. So here I am, memorizing it in my off-brain cache… Overview of NIS A Network Information Service (NIS) is a system for sharing service configuration info. It’s old, insecure, but still very useful. It relies on having a […]
Posted on September 19, 2016, 11:06 AM, by Mike Diehn, under
SysAdmin.
What’s the name? Before I get started, let me explain something about the name “the Enfield ListServ.” Actually, “ListServ” is the brand name of a server software that organizations use to manage e-mail mailing lists. Enfield doesn’t have a ListServer server, our mailing list is hosted for us by Dartmouth on theirs. So, you could call […]
Posted on March 23, 2015, 10:37 AM, by Mike Diehn, under
SysAdmin.
Haven’t found this documented anywhere so here it is: A user reported today that while trying to dump his database, his mysqldump command was reporting this error: testdev has insufficent privileges to SHOW CREATE PROCEDURE Turns out the problem is that user testdev has all permissions in it’s own database, but no permissions in the mysql database. […]
Posted on April 15, 2014, 8:05 AM, by Mike Diehn, under
SysAdmin.
I googled for “linux timer app” looking for something like a virtual kitchen timer I use to remind me to switch back to standing after a sit-break at my workstation. And Google found this gem for me from Pat Brisban on the ArchLinux forums: # set an ad-hoc GUI timer timer() { local N=$1; shift […]
Posted on June 27, 2013, 9:12 AM, by Mike Diehn, under
SysAdmin.
We have a NIS master on our corporate network. One of it’s slaves has it’s Shorewall configured iptables firewall enabled. Whenever we would update the NIS maps on the master and run “make -C /var/yp” to push the changes out, we’d get RPC errors about that firewalled slave server. They looked like this (names changed […]
Posted on June 27, 2013, 8:53 AM, by Mike Diehn, under
SysAdmin.
Long time system admins will have run into this from time to time: a file system appears to be full when you look at it with df but not when you use du to check it out. Today, this problem appeared dramatically. Our monitoring system reported that the root file system one of our servers, […]
Posted on May 1, 2013, 7:38 AM, by Mike Diehn, under
SysAdmin.
All of redhat derived systems I’ve ever used store network configuration in /etc/sysconfig/network-scripts and use the ifup and ifdown commands to start and stop interfaces. Fine. I can’t tell you how many times over the years, though, I’ve tried to look up the options I can put in those files. I’ve never found anything in […]