Setting up /etc/security/access.conf on ubuntu

So I already describe this in another post and there are various guides on the intarwebz: 1, 2. But I wanted to point out one thing. For ubuntu, the pam_access line wasn’t working in pam.d/common-auth, where I usually put it, nor was it working in pam.d/login. But, it worked in /etc/pam.d/common-account !!! Just throw it below the pam_deny.so, account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so account requisite pam_deny.so account required pam_access.so account required pam_permit.

Continue reading ↦

Adding a new service/daemon manually on ubuntu

So I added a shiny new znc init script to /etc/init.d/ and I want to enable it so I can use upstart to start and stop the service and control it at different runlevels. First, ensure the script is 755, then lets use chkconfig to get this loaded up! If you don’t already have it: apt-get install chkconfig then do the following: chkconfig –add znc chkconfig –level 2345 znc on service znc start

Continue reading ↦

Fixing perl locale settings

See something like this: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = “en_US.UTF-8”, LANG = “en_US.UTF-8” are supported and installed on your system. perl: warning: Falling back to the standard locale (“C”). everytime you run something perl dependent? Fix it! sudo locale-gen en_US.UTF-8 Thanks ubuntuforums, your amazing!


Heartbleed...how to upgrade OpenSSL and protect yourself

From askubuntu: Security updates are available for 12.04, 12.10 and 13.10, see Ubuntu Security Notice USN-2165-1. So first you need to apply the available security updates, for example by running: sudo apt-get update sudo apt-get upgrade from the command line. Do not forget to restart the services (HTTP, SMTP, etc.) that use the affected OpenSSL version, otherwise you are still vulnerable. See also Heartbleed: What is it and what are options to mitigate it?

Continue reading ↦

Get an "Open NAT" without using DMZ or enabling UPnP

So this is something many people have had to deal with since the inception of online gaming (generally on consoles). If you were to go through the NAT error solution troubleshooting steps on xbox.com, you would get recommendations to: Enable UPnP on your router….on the WAN side…NOPE. This is a security risk. Don’t do it. Utilize a DMZ setup. No. This is stupid and unnecessary. Although it is the easy way out…

Continue reading ↦

Find command multiple -name declarations

A fancy little trick with the find command, you can do -name or declarations with the find command! find . ( -name “.sh” -o -name “.pl” -o -name “*.php” ) -mtime +20 ^that command will find (recursively) any php, pl, and sh files older than 20 days in the current directory. Thanks, unixtips.


Removing older tv show episodes and telling Sickbeard about it

This is really useful if your in a predicament where you get a show that has constant releases…they can be overwhelming! It depends on your Sickbeard running and needs very little to do its work. #!/bin/bash : <<‘END’ This script allows you to remove tv shows that have lived on your filesystem over x amount of days. It will also remove any nfo/tbn files associated with the episode if you are telling Sickbeard to populate them (I use the xbmc profile).

Continue reading ↦

Using sed to print out part of a string

This is a little tricky and a lot of people don’t use sed like this. But its actually not too hard to get a piece of a string. Lets say we have: herpderp.S14E90.tbn We want the “14? and thats it. Here is a sed that will print that out. What we are doing is telling sed about the area around the 14 so it properly matches it and then using parenthesees to indicate what we want:

Continue reading ↦

An outstanding introduction to Docker

http://serversforhackers.com/articles/2014/03/20/getting-started-with-docker/ Just wanted to note that this tutorial/intro on Docker does a great job of opening the door for this fantastic creation which has been extremely beneficial to many sysadmins already. I highly recommend you take a gander at the power of docker and how easy it can be to install/configure/implement into whatever your doing!


I've solved it! How to ensure your local repo is a exact 1:1 copy of its remote!

git fetch origin git reset --hard origin/master git clean -dffx If you run the above commands instead of just a git pull, your repo will be synced exactly (1:1) with its remote. This means: Any new files/folders you created will be removed, including sub-repositories. Any files you’ve changed that already existed in the repo will NOT have their changes stashed/saved. Any .gitignore files are not followed! Meaning any ignored files in a particular directory that were added by a program/script will be removed!

Continue reading ↦