Importing .sdtid files with stoken

So this morning I was kindly reminded again by my corporate IT overlords that my RSA soft token was going to be expiring in 9 days. Having had this token in place for a year now I had forgotten how to update it.

After a few minutes I recalled that the trick was as simple as

stoken import --file <my>.sdtid

Well that’s simple, except for the fact that in my case, this failed. After a quick bit of googling around I found that version 0.2 (which ships with my release of ubuntu) incorrectly identifies where the tokens are within the sdtid files resulting in an annoying error:

error: no valid token in file '<my>.sdtid': General failure

UGH! Well the solution is simple here. After a quick upgrade to 0.90 I’ve had no problems importing since.

Ah yes, the dreaded “Ecryptfs error locking counter” on your home directory after a reboot…

After some recent file system woes as well as some past system updates I ran into this error while trying to mount my encrypted home directory:

Enter your login passphrase:
Inserted auth tok with sig [**********************] into the user session keyring
open: Read-only file system
Ecryptfs error locking counter

*SIGH*

Some quick googling yielded the answer, at some point the ecryptfs tools now require /dev/shm mount to function properly. So the following line was added to my /etc/fstab:

tmpfs    /dev/shm   tmpfs   defaults,noexec,nosuid   0   0

After that a quick mount -a and retry to mount my home and all is well again!