March2009

How to use ecryptfs on Fedora

If you want to store a mix of encrypted and unencrypted files under the same area, choose plaintext passthrough, otherwise choose the default, no. I suggest an all or nothing approach, as it can get confusing as to which files are encrypted especially when they’re binary! (With ascii text files you can just cat a file and tell if it’s encrypted or not.)

How to delete a user from a Mediawiki database

Easy, just go into the database and delete the row from mwuser, right? wrong. If you’re using phpPgAdmin pgadmin3 or some other tool, you should get a nice message letting you know exactly which constraint would be violated if it actually let you do that dave. In my case, I had a user that had updated a few pages, so I just needed to change the revision table so that he wasn’t referenced anymore.

File system vs. block level encryption

I really like eCryptfs, an encrypted file system supported in kernel able to encrypt right on top of the already supported file systems. No kernel-user-kernel-user swapping required. I like the selective ability of encrypting individual files and I especially like the interchangeable key structure.
While eCryptfs sounds great, there are a few downsides of stacked file system encryption.

eCryptfs – POSIX compliant cryptographic file system

eCryptfs is a POSIX-compliant enterprise-class stacked cryptographic filesystem for Linux that is…

Aliases in lighttpd are easy one-liners

Enabling aliases in Lighttpd is even easier than in Apache. If you want to browse your app without having to include the trailing slash, then make sure you didn’t include trailing slashes in your alias definitions (my alias.url’s above don’t have the trailing slash). Many examples show something like /doc/ => “/usr/share/doc/” but then it won’t find the index.php or index.html on its own.

Permanently Disable the PC Speaker in Linux

Removing the pcspkr module is fine for an instant halt to all beeping noises coming out of the machine, and sure you could just add this to your profile in .bashrc or .bash_profile, But the right/best/most complete way is to do it system-wide where it doesn’t even get enabled in the first place by blacklisting it in the modprobe configuration.

How to find a device’s UUID and use it in fstab

Look in the directory /dev/disk/by-id to see how your attached storage devices are mapped in dev. If they are not already identified by UUID or Label, they will just get the next available letter in the alphabet. sda, sdb, then sdc, etc. The reason why you want to see them “by-id” is because if you plug in multiple devices in a different order one day, you may find what was “sdb3″ yesterday is “sdc3″ today. Look up the Universally Unique Identifier using the blkid command (part of e2fsprogs) The identifiers are generated when partitions are created. Non partitioned devices will not have these identifiers. Use of UUIDs are preferred over Labels since Labels are not unique.