Linux Journal | May 2016 | Issue
Total Page:16
File Type:pdf, Size:1020Kb
A Look at PostgreSQL 9.5’s Most Interesting Features ™ WATCH: ISSUE OVERVIEW V MAY 2016 | ISSUE 265 http://www.linuxjournal.com Since 1994: The Original Magazine of the Linux Community CONFIGURE SECURE TOKEN-BASED YOUR SERVER AUTHENTICATION WITH to Use Your Gmail Account TIPS FOR YubiKey 4 DEVELOPERS to Prevent Compromise at the Source + Build Your Own Tiny Internet HOW TO Install Qubes and Navigate the Desktop LJ265-May2016.indd 1 4/20/16 8:28 PM NEW! Linux on NEW! SSH: a Power Modern Author: Lock for Practical books Ted Schmidt Your Server? Sponsor: Author: HelpSystems Federico Kereki for the most technical Sponsor: people on the planet. Fox Technologies Self-Audit: Agile Checking Product Assumptions Development at the Door Author: GEEK GUIDES Author: Ted Schmidt Greg Bledsoe Sponsor: IBM Sponsor: HelpSystems Improve Finding Your Business Way: Mapping Processes with Your Network an Enterprise to Improve Job Scheduler Manageability Author: Author: Mike Diehl Bill Childers Sponsor: Sponsor: Skybot InterMapper Download books for free with a DIY Combating simple one-time registration. Commerce Site Infrastructure Sprawl Author: Reuven M. Lerner Author: http://geekguide.linuxjournal.com Sponsor: GeoTrust Bill Childers Sponsor: Puppet Labs LJ265-May2016.indd 2 4/20/16 8:28 PM NEW! Linux on NEW! SSH: a Power Modern Author: Lock for Practical books Ted Schmidt Your Server? Sponsor: Author: HelpSystems Federico Kereki for the most technical Sponsor: people on the planet. Fox Technologies Self-Audit: Agile Checking Product Assumptions Development at the Door Author: GEEK GUIDES Author: Ted Schmidt Greg Bledsoe Sponsor: IBM Sponsor: HelpSystems Improve Finding Your Business Way: Mapping Processes with Your Network an Enterprise to Improve Job Scheduler Manageability Author: Author: Mike Diehl Bill Childers Sponsor: Sponsor: Skybot InterMapper Download books for free with a DIY Combating simple one-time registration. Commerce Site Infrastructure Sprawl Author: Reuven M. Lerner Author: http://geekguide.linuxjournal.com Sponsor: GeoTrust Bill Childers Sponsor: Puppet Labs LJ265-May2016.indd 3 4/20/16 8:28 PM MAY 2016 CONTENTS ISSUE 265 FEATURES 82 Secure 104 The Tiny Token-Based Internet Project, Authentication Part I with YubiKey 4 Use KVM to build a fully functioning “Internet” Busy Linux administrators and learn all about Linux often need to use insecure in the process. terminals, such as a co-worker’s desktop, John S. Tonello to get their jobs done. Todd A. Jacobs provides ON THE COVER (3VVRH[7VZ[NYL:83 Z4VZ[0U[LYLZ[PUN-LH[\YLZW a modern look at :LJ\YL;VRLU)HZLK(\[OLU[PJH[PVU^P[O@\IP2L`W token-based authentication )\PSK@V\Y6^U;PU`0U[LYUL[W using YubiKey 4. /V^[V0UZ[HSS8\ILZHUK5H]PNH[L[OL+LZR[VWW *VUMPN\YL@V\Y:LY]LY[V<ZL@V\Y.THPS(JJV\U[W Todd A. Jacobs ;PWZMVY+L]LSVWLYZ[V7YL]LU[*VTWYVTPZLH[[OL:V\YJLW Cover Image: © Can Stock Photo Inc. / coraMax 4 | May 2016 | http://www.linuxjournal.com LJ265-May2016.indd 4 4/20/16 8:28 PM CONTENTS COLUMNS IN EVERY ISSUE 28 Reuven M. Lerner’s 8 Current_Issue.tar.gz At the Forge 10 Letters PostgreSQL 9.5 18 UPFRONT 38 Dave Taylor’s 26 Editors’ Choice Work the Shell 72 New Products The Many Paths to a Solution 129 Advertisers Index 46 Kyle Rankin’s Hack and / Secure Desktops with Qubes: Installation 54 Shawn Powers’ The Open-Source Classroom The Peculiar Case of E-mail in the Cloud 62 Susan Sons’ Under the Sink 26 Securing the Programmer, Part I 124 Doc Searls’ EOF Privacy and the New Math 82 LINUX JOURNAL (ISSN 1075-3583) is published monthly by Belltown Media, Inc., PO Box 980985, Houston, TX 77098 USA. Subscription rate is $29.50/year. Subscriptions start with the next issue. 5 | May 2016 | http://www.linuxjournal.com LJ265-May2016.indd 5 4/20/16 8:28 PM Executive Editor Jill Franklin [email protected] Senior Editor Doc Searls [email protected] Associate Editor Shawn Powers [email protected] Art Director Garrick Antikajian [email protected] Products Editor James Gray [email protected] Editor Emeritus Don Marti [email protected] Technical Editor Michael Baxter [email protected] Senior Columnist Reuven Lerner [email protected] Security Editor Mick Bauer [email protected] Hack Editor Kyle Rankin lj@greenfly.net Virtual Editor Bill Childers [email protected] Contributing Editors )BRAHIM (ADDAD s 2OBERT ,OVE s :ACK "ROWN s $AVE 0HILLIPS s -ARCO &IORETTI s ,UDOVIC -ARCOTTE 0AUL "ARRY s 0AUL -C+ENNEY s $AVE 4AYLOR s $IRK %LMENDORF s *USTIN 2YAN s !DAM -ONSEN President Carlie Fairchild [email protected] Publisher Mark Irgang [email protected] Associate Publisher John Grogan [email protected] Director of Digital Experience Katherine Druckman [email protected] Accountant Candy Beauchamp [email protected] Linux Journal is published by, and is a registered trade name of, Belltown Media, Inc. PO Box 980985, Houston, TX 77098 USA Editorial Advisory Panel Nick Baronian Kalyana Krishna Chadalavada "RIAN #ONNER s +EIR $AVIS -ICHAEL %AGER s 6ICTOR 'REGORIO $AVID ! ,ANE s 3TEVE -ARQUEZ $AVE -C!LLISTER s 4HOMAS 1UINLAN #HRIS $ 3TARK s 0ATRICK 3WARTZ Advertising E-MAIL: [email protected] URL: www.linuxjournal.com/advertising PHONE: +1 713-344-1956 ext. 2 Subscriptions E-MAIL: [email protected] URL: www.linuxjournal.com/subscribe MAIL: PO Box 980985, Houston, TX 77098 USA LINUX is a registered trademark of Linus Torvalds. LJ265-May2016.indd 6 4/20/16 8:28 PM ExCel London | 31 May – 3 June 2016 “The Lollapalooza of big data conferences.” — Wired.com Data science meets business. At Strata + Hadoop World, learn the skills and technologies you need to build successful, Save 20% data-driven projects and organizations. Register today. strataconf.com/uk Use code PCLinuxJournal LJ265-May2016.indd 7 4/22/16 1:00 PM Current_Issue.tar.gz The Power of Free SHAWN hen I was a kid, I saved my money for POWERS weeks in order to buy the Aerobie Shawn Powers is the (https://en.wikipedia.org/wiki/Aerobie). I W Associate Editor for lived in a ghetto of Detroit, and during the summer, we often Linux Journal. He’s would play Frisbee in the street for entertainment. I figured if also the Gadget Guy I could buy the Aerobie, we’d be able to play Frisbee across for LinuxJournal.com, and he has an multiple blocks! It would be amazing! So I hunted pop cans interesting collection for weeks (in Michigan, pop can returns are 10 cents each), of vintage Garfield and finally I saved enough money to buy one. I took it home coffee mugs. Don’t let his silly hairdo and tossed it down the street. And it kept going. I suspect fool you, he’s a it’s still going, 30 years later. It flew down the street, over a pretty ordinary guy block of houses and became a tiny dot in the sky. I never saw and can be reached via e-mail at it again. Thankfully, unlike Aerobie buyers, it doesn’t cost [email protected]. anything to start a brand-new project with Linux! We can Or, swing by the install our operating system without worrying about license #linuxjournal IRC channel on fees or saving up pop can money—and that means we aren’t Freenode.net. limited in the cool things we can do! Reuven M. Lerner starts off the issue with an informative article on PostgreSQL 9.5. Relational databases might seem V old-school, but what they do, they do very well. Reuven describes some of the cool new features of 9.5. Next up, Dave VIDEO: Taylor explains how to solve programming problems with the Shawn wegrep tool. Manipulating text via script is both incredibly fun Powers runs and often very frustrating. (That frustration is part of the fun, through if I’m being completely honest.) If you’re a scripter who deals the latest issue. with text, you won’t want to miss Dave’s column. Kyle Rankin continues his Qubes series this month. He 8 | May 2016 | http://www.linuxjournal.com LJ265-May2016.indd 8 4/20/16 8:28 PM Current_Issue.tar.gz described the setup last month, and conceptually how it works, and here he covers the multi-VM model for doing actual computing. The technologies in Qubes aren’t brand new, but the way of using them certainly is. Even if you’re not interested in the level of security Qubes offers, you owe it to yourself to read his series if only to UNDERSTAND THE THOUGHT PROCESS ITSELF )TS PRETTY UNIQUE I started my column this month with a simple problem: e-mail. Now that cloud computing is the norm, it means the servers you spin up aren’t in your network anymore, and so might be blocked from using your ISP’s SMTP server. There are certainly ways to set up an e-mail server that you can use for proper E MAIL ROUTING BUT ) JUST NEED A WAY TO SEND QUICK AND DIRTY SERVER NOTIFICATION messages to myself when something goes wrong. I use Postfix and Gmail to accomplish that task, and I figured I’d share my experience. Susan Sons is back this month with a brilliant article on securing your source code, at the source! It’s great to have your revision control system secured and reliable, but what if the computer you actually use to develop gets compromised? That’s a bigger concern than you might realize, and Susan walks through dealing with the often overlooked problem. We follow Susan’s column with Todd A. Jacobs’ tutorial on how to implement YubiKey 4 for USB token-based authentication.