Generate salted shadow hashes using Python crypt()

The other day I was doing some server setups (using ansible for automation) and I needed to create the same user/password on four different machines. It’s easy with ansible’s user module, but you need to provide a pre-hashed password. The key is to use python’s crypt.crypt(), which you can do interactively from a python shell: […]

Machine Check Exception on Samsung NP900X3C on UEFI boot

Note: As of Linux 3.7.6 the samsung-laptop no longer loads when booting in UEFI mode on Samsung hardware. I got a beautiful new Samsung NP900X3C ultrabook this week. It came with Windows 7, which I only used to go download the Arch Linux ISO (ok fine, I also checked my email). As this machine is […]

Blocking Facebook with DNS

Facebook has repeatedly shown to be untrustworthy in their handling of privacy, their IPO was an over-inflated/over-hyped scam, and their business model is shady at best. I block all Facebook domains at the DNS level so they can’t get their grubby hands on any of my data, browsing habits, etc. To block all Facebook domains, […]

Invalid MIT-MAGIC-COOKIE-1 in Arch Linux

I recently reinstalled my Arch Linux desktop onto a brand spankin’ new solid-state hard drive. I’ve been extremely happy with the performance, but I was having problems with X11 forwarding over SSH. aorth@dspace:~$ meld Invalid MIT-MAGIC-COOKIE-1 key/usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display warnings.warn(str(e), _gtk.Warning) /usr/bin/meld:111: GtkWarning: gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)’ failed gtk.icon_theme_get_default().append_search_path(meld.paths.icon_dir()) Traceback (most recent […]

Enabling logcat on the Huawei U8185

For some reason the geniuses at Huawei decided to disable logcat on the Huawei U8185. No doubt they view it as a security (by obscurity) measure, but it’s really freakin’ annoying as I’m actually trying to do some development on this device. Despite logging being ON in the kernel, logcat is not happy. $ adb […]