Friday, May 19, 2017

RSA SecurID on ChromeBook (Command Line)

I needed to be able to use my token generator on my new ChromeBook.  This particular model doesn't seem to have Google Play enabled at the moment, so the Android app wasn't an option.

I've used "stoken" for command line SecurID tokens in the past on macOS Sierra.  So, I decided I'd compile by hand.

This requires a ChromeBook already in Developer Mode, with a root password and a chronos password established so it is not left insecure!

Open crosh, then run shell.

First, install chromebrew (google it!)

Update it.

Install some prerequisites:

crew install autoconf
crew install automake
crew install nettle

Remount your user partition to allow execute privs:

sudo mount -o remount,exec /home/chronos/user -i

Clone the source for libxml2, you'll need to compile it first:

git clone git://git.gnome.org/libxml2
cd libxml2
./autogen.sh
make
make install
cd ..

Clone the source for stoken:

git clone https://github.com/cernekee/stoken.git
cd stoken
./configure
make
make install
cd ..

Get your sdtid file onto the machine (sd card or Dropbox or something.  Don't leave it there when you're done!)

stoken import --file=my.sdtid

It will prompt you for a passphrase if the file has one, then for a new password and to confirm the password.  You will enter this password every time you want to generate the token code.

After this, to generate a token, just run stoken and enter your password.

I hope I didn't leave out any crucial steps.  This is my summary after a lot of hit-and-miss effort to accomplish this.