Skip to content

Compile OPIE on OS X

So I needed to get the One-time Passwords In Everything (OPIE) client running on my Mac. The last message in the README dates 1998, but the client, at least, isn’t too difficult to get working on a Mac. Out of the box, compilation fails with this:

login.c:79: error: 'struct utmpx' has no member named 'ut_name'

To fix this, open opie-2.4/libopie/login.c and change line 79 from:

  strncpy(u.ut_name, name, sizeof(u.ut_name));


  strncpy(u.ut_user, name, sizeof(u.ut_user));

I’m not anywhere near smart enough to figure that out on my own, but this Google search lead me to this page, which gave the clue to do this. After you make this change, opie will compile, but won’t install because it looks for chown in /bin, so after monkeying with the make files and what not, I gave up and just created symlink, like so: sudo ln -s /usr/sbin/chown /bin/chown.

To save time, I created a new archive with the change I made, it’s available here. The code was released under the Naval Research Laboratory (NRL) license which appears to be a derivative of the UC Berkley license. As far as I can tell, this is not the ‘BSD’ license, but is similar, so I don’t think I’m in violation of the license by redistributing this.

Posted in OS X, Security, Software Development.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.