top image
home  /  pages  /  tech tips  /  contact about

Lockout: The Self-imposed, Computer-aided Work Enforcer

Software for Slackers: The 1-Step Self-Help Program to Increase your Discipline & ProductivityTM

Introduction

Are you a slacker? So am I. Do you procrastinate all day? Do you browse the Web, read the news, and write email all day in stead of working? So do I. Does it make you feel miserable and apathetic? Do you tell yourself to stop browsing the fucking Web and get some bloody work done? Do you have absolutely no discipline? I know your pain.

But recent technological advancements have made it possible... There is a cure for your disease!

Years of slacking at the renowned Massachusetts Institute of Technology have resulted in a brilliant 572-line Perl script (which includes 310 empty lines and comment lines for free!) that makes it all possible! Your productivity will dramatically increase!

Today, I present Lockout: The Self-imposed, Computer-aided Work Enforcer. This program will help you get some work done by not allowing you to browse the Web. It won't allow you to do anything but work. It's a miracle! Your colleagues will respect you, your Ph.D. adviser will compliment you, and your boss, if you have one, will probably not notice the difference! It's amazing! Scroll down! Read more!

What do I need?

Linux, of course, you dumbass dipshit.

This sounds too good to be true!

It is, you fool! If you do this wrong, or if Lockout fucks up, you're screwed: you'll end up not knowing your own root password. In that case, only God, single-user mode, Knoppix, or tomsrtbt can bring salvation. (The good news is that nothing bad ever happened to me as a result of Lockout.)

Give it to me! Give it to me! I want to download it!

lockout (source)
lockout_0.2.3-2_i386.deb (Debian)
lockout-0.2.3-3.i386.rpm (Redhat/Fedora)
lockout-0.2.3.tgz (tarball)

How does it work?

Well, we can't really tell you, but, basically, it does anything you want! For example, it can change your firewall to disallow outgoing connections to port 80. Or it can disable incoming email. And you'll get an outgoing email blocker for free if you download now!

How does it really work?

The real secret is that Lockout will first run a script that you write (to put up a different firewall configuration, to remove yourself from /etc/sudoers, or anything else that you believe will impose labor on yourself). After that, Lockout will change your root password (for a specified amount of time) to something random so that you can't secretly undo all those productive settings and be a lazy slacker again. When time is up, Lockout changes the root password back to its original and runs a script that undoes the other settings (firewall, /etc/sudoers, etc.) so that you can finally continue your peaceful slacking.

For a good howto, take a look at the fine article written by David A. Harding.

What if the machines crashes?

Lockout copies the crypted root password (obtained using getpwent()) to a magic file before changing the root password to something random. A cron job runs every minute to see if time's up and, if so, puts the original crypted password back (using usermod -p). So no essential data is lost across crashes and reboots.

What if I suddenly really need to become root?

A @reboot entry in root's crontab file ensures that rebooting your machine will put the original root password back in place. Worst case scenario is that you have to reboot your computer. Well, that's not really true: worst case scenario is that things fail badly and you end up not knowing your root password.

Who are you?

I am Thomer M. Gil [].

URL: https://thomer.com/lockout/index.html
Copyright © 1994-2022 by Thomer M. Gil
Updated: 2017/08/05