BestBuy.com Bad Password Policies

I was spending a Gift Certificate from Christmas 2006 (I’m not joking) and when I registered for BestBuy.com, I got this:

bestBuyStupid_2008-01-16_15-55-45

ARE YOU SERIOUS???

The !@#$%^&*()-=`~[]{}\;:'”,<.>/? that I had in my password isn’t allowed?

I opted for a 19 character password with lower and upper case letters and numbers.

BUT STILL! This is not really acceptable IMO.

Another Reason Why I Run Linux At Home

I admit it. I am cheap.

These numbers don’t mix with my poor mans mentality.

http://blogs.msdn.com/ericnel/archive/2007/11/20/windows-server-2008-prices-announced.aspx

How about a nice free version of the Web Server edition or something?

Windows Server 2003 had a web version that was cheap. I don’t see an equivalent here.

http://www.microsoft.com/presspass/press/2007/nov07/11-12HyperVPR.mspx

What in the world are they thinking with the “without Hyper-V” versions? Talk about confusing.

Unfortunately the state of the Xen Hypervisor on my favorite Linux isn’t that great.

https://help.ubuntu.com/community/Xen

That is a few revs back. But I am pretty sure that OpenSUSE has great OOTB Xen support. So no “without Hyper-V” edition here.

GNU Mailman and Apache mod_mbox

Over a year ago I saw mod_mbox. I love they way it provided nice looking archives and an Atom1 feed for a mailbox archived in the mbox2 format. I knew immediately that I wanted this for some Mailman lists which I provide.

Mailman does store its archives in mbox format. Unfortunately mod_mbox wants one mbox file per month, named a very specific way.

Here is how I got there. First, the tools:

  • Mhonarc is a mail to html converter used by popular sites such as mail-archive.com and lists.debian.org.
  • Mharc is a web-based mail archiving system for multiple mailing lists.
  • Mharc has a tool called mbox-month-pack which does (almost)exactly what I want.
  • Mailman is already configured.
  • mod_mbox just needs to be plugged into a pre-configured apache.

The Procedure:

Mailman stores its archives in /var/lib/mailman/archives/private/ with complete mbox archives in one file in a file named ${list}.mbox/${list}.mbox. I just need to feed that to Mharc’s mbox-month-pack.

Massage the filenames a bit:

for i in ????-?? ; do mv $i ${i/-/}.mbox ; done

Setup Apache as the mod_mbox docs say.

Modify mailman’s list_members program to extract a encrypted password for each member, with output suitable for basic http authentication.

— /var/lib/mailman/bin/list_members   2007-06-12 08:49:33.000000000 -0400
+++ /var/lib/mailman/bin/list_members_pass      2007-11-08 23:04:20.000000000 -0500
@@ -80,6 +80,10 @@

from email.Utils import formataddr

+import crypt
+from random import randint
+import string
+
PROGRAM = sys.argv[0]
ENC = sys.getdefaultencoding()
COMMASPACE = ‘, ‘
@@ -140,6 +144,11 @@
         return status <> MemberAdaptor.ENABLED
     return status == WHYCHOICES[why]

+salt_chars = ‘./’ + string.ascii_letters + string.digits
+
+def crypt_password(password):
+    salt = salt_chars[randint(0, 63)] + salt_chars[randint(0, 63)]
+    return crypt.crypt(password, salt)

def main():
@@ -258,14 +267,16 @@
         rmembers.sort()
         for addr in rmembers:
             name = fullnames and mlist.getMemberName(addr) or ”
+            password = crypt_password(mlist.getMemberPassword(addr) or ”)
             # Filter out nomails
             if nomail and not whymatches(mlist, addr, why):
                 continue
–            print >> fp, formataddr((safe(name), addr))
+            print >> fp, formataddr((safe(name), addr)) +”:”+password
     if digest:
         dmembers.sort()
         for addr in dmembers:
             name = fullnames and mlist.getMemberName(addr) or ”
+            password = crypt_password(mlist.getMemberPassword(addr) or ”)
             # Filter out nomails
             if nomail and not whymatches(mlist, addr, why):
                 continue
@@ -278,7 +289,7 @@
                 # They’re getting MIME digests
                 if kind == ‘plain’:
                     continue
–            print >> fp, formataddr((safe(name), addr))
+            print >> fp, formataddr((safe(name), addr)) +”:”+password

 

Wrap all of this up in a nice little script and insert into cron so that messages, usernames and passwords are refreshed hourly or daily.

#!/bin/bash

MAILMAN=/var/lib/mailman
MBOXMONTHPACK=/usr/local/mharc/bin/mbox-month-pack
LISTLISTS=$MAILMAN/bin/list_lists
LISTMEMBERSPASS=$MAILMAN/bin/list_members_pass

for list in `$LISTLISTS -b` ; do
  INPUTFILE=/var/lib/mailman/archives/private/$list.mbox/$list.mbox
  OUTDIR=/var/mbox/$list
  if [[ ! -d $OUTDIR ]]; then mkdir $OUTDIR; fi
  if [[ ! -f $OUTDIR/.htaccess ]]; then
    cat >$OUTDIR/.htaccess <<EOD
AuthType Basic
AuthName “mailman Password Required”
AuthUserFile /var/passwords/$list.pwfile
Require valid-user
EOD
  fi

  $LISTMEMBERSPASS $list > /var/passwords/$list.pwfile

  $MBOXMONTHPACK $INPUTFILE -outdir $OUTDIR
  pushd $OUTDIR
    for i in ????-?? ; do mv $i ${i/-/}.mbox ; done
    mod-mbox-util -v -c .
  popd

done

 

libapache2-mod-mbox is available on my Launchpad PPA.

mhonarc is available by default in debian.

mharc you will have to get the source and build.

  1. Say what you want about RSS vs Atom. I don’t care. Any tool that matters supports both… except mod_mbox.
  2. Yes, mbox isn’t the ideal mailbox format, but in this case it works

Gmail Was Upgraded. I Did Not Notice.

I didn’t realize that gmail’s web interface was upgraded recently. I am a user of the gmail macros Greasemonkey script. It stopped working right around the time my Gmail offered its new IMAP enable functionality.

IMAP is nice and all, but if I had to choose, I’d choose to have my Greasemonkey script work. Luckily the script has been updated to support the new gmail web interface.

http://blog.persistent.info/2007/11/macros-for-new-version-of-gmail.html

You have to go manually install the script update. So if you were using it and it just stopped working, go upgrade!

It is worth it just for the “e” to archive functionality. “l” to label is just a bonus.

Tiling Windows Without Minimize All

Did you know you could do this in windows?

http://wiki.ucandoit.org.uk/index.php?title=Managing_windows

I didn’t, and I have wanted it for years – I only knew about “tile” in the taskbar itself – so I’d have to minimize all, restore the two I wanted and use that.

I’m VERY happy to have found this. I’m VERY angry that I’ve lived without knowing about it for this long. I hate my own ignorance.

Basically, I often work with only 1 display. I know Multi Monitor rules, but what about when you are on the road with your laptop only? So I want one window on the left and another one on the right.

From the above link:

  1. Click the taskbar entry for the first window you want to view;
  2. Press and hold down the “Ctrl” key;
  3. Click the taskbar entry for the second window you want to view – both of the taskbar entries should now be selected;
  4. Release the control key;
  5. Right-click on either of the taskbar entries you selected;
  6. Click “Tile Horizontally” if you want your windows to appear one above the other; or click “Tile Vertically” if you want your windows to appear side-by-side. If you are reading notes from the UCanWiki, it is often best to tile the window vertically.

 

Did I mention the part where I hate my own ignorance?

Brain fart with Apt

I just ran what could be one of the dumbest command lines that I’ve run in years in Linux.

sudo apt-get install pidgin & sudo apt-get remove gaim

 

No really, I want to install pidgin and remove gaim in parallel!

Any apt user will tell you where I went wrong. Apt locks the dpkg database. Only one operation at a time please.

E: Could not get lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

 

DUH!

I’m amazed that I even tried this. I blame Saturday morning foggy mind. I’ve only had 2/3 of a cup of coffee so far.

Reminder to self: don’t program or do important stuff with foggy mind. Tools nice enough to save you from yourself like dpkg are OK.

Goodbye Window Clippings, Hello Greenshot

Kenny Kerr’s Window Clippings is a great tool. It recently tripped me up when I tried to take a screenshot of a window with no title. It just didn’t seem to work.

Enter: Greenshot. Open source sweet open source, Greenshot is written in C# and is actively developed. I’m not sure why they still use CVS on SourceForge, but I’m ok with it. https://sourceforge.net/projects/greenshot/

ViewVC the source:  http://greenshot.cvs.sourceforge.net/greenshot/GreenShot/Forms/

My first experience with it was excellent. I highly recommend this tool.

Ubuntu old school

So I run into this old server and I realize it had DAPPER on it still! After running updates I just can’t take it any longer. I try the update-manager upgrade method and then I remember (with help of google) that this didn’t always work for dapper->edgy. So I vim “:%s/dapper/edgy/g” the sources.list file and apt-get update && apt-get -f dist-upgrade

Luckily this thing is only a server and so I only get this prompt:

787 upgraded, 148 newly installed, 58 to remove and 31 not upgraded.
Need to get 469MB of archives.

Over a lowly T1 its only estimating 45 minutes. Not bad. *sigh* Then I’ll have to go edgy->feisty and next week I’ll probably find myself moving it to gutsy.

No power in the nets can stop me.

This customer of mine gets Internet access through their building. It is nice for them because they are a tiny company and don’t have time or money to run much of their own network. Unfortunately, doing this Ubuntu upgrade for them was not trivial. They have a WatchGuard firewall which is configured pretty dumb. When I try to apt-get upgrade, I get a failure.

Apt-get didn’t give me much detail other than a failure message, but trying to access a deb in my browser gives good information:

Response denied by […] WatchGuard Firewall HTTP proxy.

Reason: header ‘Content-Type’ denied rule=’Default’ value=’application/x-debian-package’

WOW! Debian denied!

This was easy enough to work around by using proxies. Thank goodness apt supports http_proxy. But thank a friend even more for a favor so that I could proxy through a faster connection and max out the customers T1 rather than proxy through my cable modem and only get cable modem outbound speeds. 180kB > 40kB

I won’t be getting an iPod

When Apple updated their iPod lineup a couple of weeks ago, I started to drool. I’ve wanted an 80G iPod for a while, but when I finally had the opportunity to buy one – May of this year – I recognized that the then current generation of iPod had been around for a while and that a new one would be out soon.

This really pisses me off: New iPods reengineered to block synching with Linux

The 160G iPod “classic” and the iTouch are a couple of really sexy sweet products. However, I wouldn’t buy a toaster oven that I couldn’t empty the crumb tray, and I won’t buy an iPod from a company that intentionally limits my ability to use their product.

Zune is lame at 30G. Creative has some offerings but Apple is so far ahead simply in user experience. This is why I wanted an iPod over something else. If you have never used an iPod for more than 5 minutes that you don’t know what you are missing. Maybe this is a case of ignorance is bliss. I might have been happy with a Creative product if I had never touched an iPod. Alas, I have touched an iPod. The menu system and “click wheel” interface are superb.

-ANGRY