Encrypting your /home and swap on Ubuntu Linux v8.04 (Hardy Heron)

Linux, OS 1 Comment »

As an ongoing effort for work, IT has deemed it necessary to encrypt our laptops.  No problem I say, but one issue:  the encryption software they chose only works on Windows 2000/XP and certainly not on OSX or Linux.  My chosen platform for work is Ubuntu 8.04 with the bling of compiz to show it off ;-) In order to comply, I did a little googling and ran across an excellent article by Lars Strand on how to encrypt your /home directory and swap space on Ubuntu 8.04 (should work with 6.04 and higher).

Encrypted swap and home partition in Ubuntu 8.04

I really would like to have an encrypted swap and home partition on my laptop. In case it gets stolen or if I should forget it somewhere, I can be sure that no-one would be able to read my private files. In this mini-howto I set my home partition using LVM, but using a regular partition should work just fine. This howto should also work, with minor modification, if you use another distribution than Ubuntu.
By using Linux Unified Key Setup (LUKS) setting up encrypted partition in Linux is done in no time.

read more

I’m totally impressed by the article - the instructions are step by step and are easy to follow.  I’d create a new user belonging to the admin group with its home directory outside of ‘/home’ and use that user to perform the steps.

Initially I attempted to use an USB thumb drive to hold a key file but it proved unreliable because it wasn’t being mounted consistantly before the /etc/init.d/cryptdisks & /etc/init.d/cryptdisks.early were being executed on boot up.  This issue would cause the key file to be unavailable and therefore the encrypted home from being attached to (/etc/crypttab).  However, when if I inserted the thumbdrive after the system booted, the usb thumb drive would be auto-mounted and performing ‘mount /home’ would mount the encrypted home directory.

Listen to this podcast Listen to this podcast

GeekBrief.tv episode 361: Brian Albert of My Home 2.0

How To, humor No Comments »

There are several people at work that Brian Albert remind me of My Home 2.0

Listen to this podcast Listen to this podcast

Combining multiple Adobe PDF files into a single PDF file

How To, Linux, OS No Comments »

After I downloaded a few eBooks from Bruce Perens’ Open Source Series, I noticed that several of the books were zip files containing the chapters as individual PDF files.  I don’t know about you, but I would rather hava a single monolithic PDF file for each book.

By using Ghostscript and pdftk, we are able to create the PDF file with no problem:

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE="Implementing CIFS The Common Internet File System.pdf" -dBATCH frontmatter.pdf content.pdf foreword.pdf intro.pdf ch01.pdf  ch02.pdf  ch03.pdf  ch04.pdf  ch05.pdf  ch06.pdf  ch07.pdf  ch08.pdf  ch09.pdf  ch10.pdf  ch11.pdf ch12.pdf  ch13.pdf  ch14.pdf  ch15.pdf  ch16.pdf  ch17.pdf  ch18.pdf  ch19.pdf  ch20.pdf  ch21.pdf  ch22.pdf ch23.pdf  ch24.pdf  ch25.pdf  ch26.pdf apa.pdf apb.pdf apc.pdf apd.pdf glossary.pdf references.pdf index.pdf

On Ubuntu Linux, you can quickly install these two tools with a single command:

aptitude install gs pdftk

Listen to this podcast Listen to this podcast

ubuntu server 7.10 as a vmware guest on an ubuntu 8.04 host, requires ‘clock=pit’

Linux, OS No Comments »

In order to avoid a drifting time clock in “ubuntu server 7.10″ vmware guest machine on an ubuntu 8.04 host, you need to do a few things:

  • /etc/vmware/config
  • host.cpukHz = 2000000  <– replace # with speed of your cpu (2GHz listed here)
  • host.noTSC = TRUE
  • ptsc.noTSC = TRUE
  • ‘clock=pit’ added to the kernel line in /boot/grub/menu.lst
  • tools.syncTime = “TRUE” in the (vmware_guest).vmx file

Listen to this podcast Listen to this podcast

Synchronize a Sybase ASE database sysusers with master..syslogins

ASE, Sybase No Comments »

Not sure who was the original author of this short synchronization script but kudos to whomever it is!

isql -Usa -S server -D my_db -i sync_users.sql

sync_users.sql

EXEC SP_CONFIGURE "allow updates", 1
go

/* delete names not found in master syslogins */
DELETE FROM sysusers
WHERE suid > 1
 and uid < =16383
 and uid > 1
 and name not in
  (SELECT name FROM master..syslogins)
go

/* update sysusers and resync all uids from the existing suids */
IF exists(SELECT 1
   FROM sysobjects
   WHERE name = "sysusers_holding"
    and type = "U")
DROP TABLE sysusers_holding
go

CREATE TABLE sysusers_holding (
 id NUMERIC(6,0) IDENTITY PRIMARY KEY,
 suid INT null,
 uid INT null,
 gid INT null,
 name CHAR(30) null,
 environ VARCHAR(255) null)
go

/* populate the holding table */
INSERT INTO sysusers_holding (suid, gid, name, environ)
SELECT suid, gid, name, environ
 FROM sysusers
 WHERE suid > 1
  and uid < = 16383
  and uid > 1
go

/* update the uids. */
DECLARE syncuser CURSOR FOR
 SELECT name, uid
 FROM sysusers_holding
 FOR UPDATE OF uid, suid
go

DECLARE @name CHAR(30), @uid INT, @suid INT
 SELECT @suid = 9999
  OPEN syncuser
  FETCH syncuser INTO @name, @uid
  WHILE (@@sqlstatus != 2)
  BEGIN
   IF exists(SELECT 1
    FROM master..syslogins
    WHERE name = @name)
    /* got the name - update the uid */
   BEGIN
    SELECT @suid = suid
     FROM master..syslogins
     WHERE name = @name
    UPDATE sysusers_holding SET uid = @suid, suid = @suid WHERE CURRENT OF syncuser

    IF @@ERROR != 0
    BEGIN
     ROLLBACK TRANSACTION
     BREAK
    END

    SELECT @suid = 9999
   END
  FETCH syncuser INTO @name, @uid
  END
 CLOSE syncuser
go

DEALLOCATE CURSOR syncuser
go      

/* now move records over */
DELETE FROM sysusers
 WHERE suid > 1
  and uid < =16383
  and uid > 1
go

INSERT INTO sysusers
 SELECT suid, uid, gid, name, environ
 FROM sysusers_holding
go

/* sp_helpuser will show any mis-matches) */
EXEC SP_HELPUSER
go

EXEC SP_CONFIGURE "allow updates", 0
go

Listen to this podcast Listen to this podcast

Introducing….. SweeperBot!

Perl, Windows, misc No Comments »

SweeperBot is an application written by Paul Fenwick that plays Windows minesweeper for you automatically. It’s based upon code orignally written by Matt Sparks.

Get it at SweeperBot.org!

Listen to this podcast Listen to this podcast

Google Video: Introduction to SQLite

Databases, SQLite, Training No Comments »


We are currently using SQLite in production for some smaller projects.

Listen to this podcast Listen to this podcast

I had one! I sold it! I want it back! Amiga 500 promo video (circa 1987)

misc No Comments »


Apparently my wife programmed in Turtle on the Amiga 500 when she was in elementary school (she’s 7 years younger than me).

Listen to this podcast Listen to this podcast

The Sybase TechWave 2008 Presentation Acceptance/Rejection letters are being sent now!

Databases, Sybase, TechWave 2 Comments »

I submitted two presentations, which I didn’t think would get accepted due to their subject matter… they didn’t get accepted. Please don’t think I’m disappointed or upset.  Personally, I’m rather pleased as I can make them into proper magazine articles.  :)  Yes, there is a new magazine in the works.

21200: Understanding RepAgent to Replication Server Communication by Creating Your Very Own RepAgent

21201: Running Sybase ASE in a Virtual Environment

Dear Jason,

Thank you for your Sybase TechWave 2008 abstract submission. There were a
tremendous number of excellent presentation ideas, and it was extremely
difficult to decide among the submissions.

We greatly appreciate the effort you made to develop your presentation and
to submit the application, but we are unable to include your suggested
session(s) in the agenda at this time. We encourage you to submit an entry
again next year.

The TechWave registration site is now live. Please visit the site at
http://www.sybase.com/techwave/registrationinfo by June 29th, to register
and to receive the early bird discount $1,295.00 rate.

We look forward to seeing you in Las Vegas this August. If you have any
questions, please contact Michele Shannon at (781) 251-7705 or at
SybaseSpeakers@experient-inc.com.

Sincerely,

Michele Shannon
Sybase TechWave Speaker Manager

Listen to this podcast Listen to this podcast

Canon Pixma MP150 printer maintenance codes

Gadgets, misc No Comments »

Taken from the Canon Pixma MP150 manual but here in a nice convenient place:

Press the Maintenance button (icon of a pliers & screwdriver) until the code you want shows up then press the Color or Black button:

Code Meaning
A Print nozzle check pattern (prints nozzle patterns on paper)
H Cartridge cleaning (uses a little bit of ink)
F Deep cleaning (uses a lot more ink - use rarely)
P Align print head (prints alignment lines on paper)
U Read in print head alignment sheet (P) and auto aligns print heads
B Clean print rollers (can prematurely wear out the rollers - use rarely)
J Clean bottom plate
1 ????

Does any one know that the “1″ code is?

Listen to this podcast Listen to this podcast

My daughter, Miriam is teething!

humor No Comments »


Teething Miriam likes to suck on fingers, see how she takes the flavors of a Louisiana style shrimp boil!

Listen to this podcast Listen to this podcast

Why I won’t be moving to Wordpress.com

Wordpress 2 Comments »

I’ve been looking at switching host providers from Yahoo for some time.  I did a test migration to Wordpress.com but discovered that they really don’t seem to get that many people would like to control their own blog.  For a simple blog, Wordpress.com would be fine but you might as well go with Livejournal.com, Facebook or some other blogging system then.  I don’t see what value Wordpress.com offers.

  • No javascript is allowed in widgets:

My code has gone from my widget

If you paste code into a widget, save and when you look again it has gone then the system has removed it.
This is done for security reasons.

Anything that has a line like this:
<script type="text/javascript">
or that uses Form or Input tags for instance is not allowed. There are other tags but the effect is the same - they disappear.

There are no exceptions to this.

  • You can’t add plugins to your wordpress blog:

Where is my plugins tab?

Unfortunately, there isn’t one to be found!

For various reasons we do not permit the uploading and use of plugins here at wordpress.com.

The hosting is simply for your blog even if you would pay $$ for email services.  Sure, they have a hack that will allow you to redirect to Google Apps but you might as go with Google’s Blogger then.  Perhaps I’m just not getting the point of Wordpress.com (not to be confused with Wordpress.org).  Can someone enlighten me?

Listen to this podcast Listen to this podcast

Sybase Sysam License Type Codes

Databases, Sybase 2 Comments »

Yuval Malchi over on the ISUG sybase-l mailing list provided the following codes for Sybase’s Sysam (FlexLM):

License Type What the License Type Represents
SS Standalone Seat
DT Development and Testing
MB Mainframe Base
MU Millions of Service Units
CP CPU License
FL Floating License
IC Internet Access License
AP Application License
SR Server License
CL Cluster License
ST Networked Seat
CU Concurrent User License
SF Standby CPU License
SV Standby Server License
SC Standby Concurrent User
OT Other

The following License Types are only available for specific Partner contracts with OEM or embedded license arrangements:

License Type What the License Type Represents
AC Application Deployment CPU
AR Application Deployment Server
AS Application Deployment Seat
AU Application Deployment Concurrent User
AO Application Deployment Other
BC Application Deployment Standby CPU
BR Application Deployment Standby Server
BU Application Deployment Standby Concurrent User

Listen to this podcast Listen to this podcast

Wordpress, MySQL and a bit of corruption caused the tags & categories to disappear

Databases, MySQL, Wordpress No Comments »

Sometime early this afternoon, the categories & tags of my blog disappeared. After a little bit of investigation (I was working quite heavily at the time), I discovered that the wp_term_taxonomy table in MySQL contained minor corruption. I ran repair table ‘wp_term_taxonomy’ and it was corrected.

Listen to this podcast Listen to this podcast

tricky: Getting Sybase ASE 12.5.4 to run on Linux PowerPC 64bit

ASE, Databases, Linux, OS, Sybase 1 Comment »

For the past few days, we’ve been struggling with getting Sybase’s ASE DBMS to start on our new Linux PowerPC (a virtual machine running on top of AIX). We were able to install the software with no problems. We weren’t able to get past the __gxx_personality_v0 error:

symbol lookup error: /opt/ibmcmp/lib64/libibmc++.so.1: undefined symbol: __gxx_personality_v0

The error is a linking issue with IBM’s Visual Age runtime (a c/c++ runtime). I was able to confirm with Sybase that ASE will NOT run with Visual Age 8.x or 9.x and that it requires the 7.0 runtime. I downloaded the 7.0 runtime from IBM’s website but still received the same error.

ASE’s linking looked okay however:

[sybase@sybase ASE-12_5]$ ldd -v bin/dataserver
libbtsymbols.so => /sybase/ASE-12_5/lib/libbtsymbols.so (0×0000008000002000)
librt.so.1 => /lib64/tls/librt.so.1 (0×0000008000647000)
libm.so.6 => /lib64/tls/libm.so.6 (0×0000008081560000)
libnsl.so.1 => /lib64/libnsl.so.1 (0×0000008000674000)
libdl.so.2 => /lib64/libdl.so.2 (0×0000008081510000)
libibmc++.so.1 => /opt/ibmcmp/lib64/libibmc++.so.1 (0×00000080006a4000)
libpam.so.0 => /lib64/libpam.so.0 (0×00000080006b7000)
libpthread.so.0 => /lib64/tls/libpthread.so.0 (0×00000080006d3000)
libaio.so.1 => /lib/libaio.so.1 (0×00000080006ff000)
libc.so.6 => /lib64/tls/libc.so.6 (0×00000080812f0000)
/lib64/ld64.so.1 (0×00000080812b0000)
libaudit.so.0 => /lib64/libaudit.so.0 (0×0000008000711000)

I worked with Sybase & IBM to track down the cause but it was IBM’s Brian Shen that was able to identify the culprit. We need to preload the libstdc++.so.5 library:

export LD_PRELOAD=/usr/lib64/libstdc++.so.5

Once we did that, we verified that the library was being picked up:

[sybase@sybase install]$ ldd $SYBASE/$SYBASE_ASE/bin/dataserver
/usr/lib64/libstdc++.so.5 (0×0000008000002000)
libbtsymbols.so => /sybase/ASE-12_5/lib/libbtsymbols.so (0×0000008000146000)
librt.so.1 => /lib64/tls/librt.so.1 (0×000000800078c000)
libm.so.6 => /lib64/tls/libm.so.6 (0×0000008081560000)
libnsl.so.1 => /lib64/libnsl.so.1 (0×00000080ef740000)
libdl.so.2 => /lib64/libdl.so.2 (0×0000008081510000)
libibmc++.so.1 => /opt/ibmcmp/lib64/libibmc++.so.1 (0×00000080007ba000)
libpam.so.0 => /lib64/libpam.so.0 (0×00000080ef6a0000)
libpthread.so.0 => /lib64/tls/libpthread.so.0 (0×00000080007cd000)
libaio.so.1 => /lib/libaio.so.1 (0×00000080007fa000)
libc.so.6 => /lib64/tls/libc.so.6 (0×00000080812f0000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0×000000800080b000)
/lib64/ld64.so.1 (0×00000080812b0000)
libaudit.so.0 => /lib64/libaudit.so.0 (0×00000080ef6c0000)

If you receive the following error, you can safely ignore it:

ERROR: ld.so: object ‘/usr/lib64/libstdc++.so.5′ from LD_PRELOAD cannot be preloaded: ignored

Don’t forget to set up your environment to include the IBM Visual Age runtime:

export LD_LIBRARY_PATH=/opt/ibmcmp/lib64:${LD_LIBRARY_PATH}
export PATH=$PATH:/opt/ibmcmp/lib64

Listen to this podcast Listen to this podcast
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in
Close
E-mail It