4

Okay, running Ubuntu 10.04 or Backtrack 5, and I want to create a very complex password with as many bits as possible. But, I doubt I would remember it entirely, and I don't want to look at a notebook to see it everytime I log-on.

So, is it possible to create a complex log-in password, save it on a file (don't know what extension; perhaps a .txt?) on a USB flash drive, and then create a script (?) that will execute transfer or input of the password to the log-in password box whenever the USB flash drive is inserted into the USB port.

Possible, or not?

P.S. And, if possible, would it be possible to encrypt the password so that if someone stole the flash drive, they wouldn't be able to decipher it without hacking it (thus, they'd have to be quite saavy).

5
  • 1
    Remember that a password does not protect your computer from unauthorized access, anyone could insert a Live CD and remove this password and copy files. The best solution is a full disk-encrypted system using LUKS
    – Lekensteyn
    Jun 5, 2011 at 4:26
  • 1
    Doesn't having the password recorded somewhere completely defeat the purpose of having a complex password? And if it's encrypted on the flash drive, then you need an encryption password... which gets you right back to where you started.
    – nhinkle
    Jun 5, 2011 at 4:28
  • @nhinkle, this should be used as a second-factor. Which means, you have a password and additionally the key.
    – nik
    Jun 5, 2011 at 5:27
  • @nik I know there are systems to use a USB device for a two-factor authentication system, but that's not what he seems to be asking for. The question says he wants to make a really tough password, and then write it down on his USB drive, and then read it off the USB drive into the password box. Thus completely defeating the point of the entire process.
    – nhinkle
    Jun 5, 2011 at 7:46
  • @nhinkle, hmmm, in that case we should suggest that he does two-factor rather than plain USB-attach-to-login techniques.
    – nik
    Jun 5, 2011 at 9:49

1 Answer 1

5

Look at pam_usb.

pam_usb provides hardware authentication for Linux using ordinary USB Flash Drives. It works with any application supporting PAM, such as su, any login manager (GDM, KDM), etc.

Start at Quickstart.

Also see, One Time Pads: The new authentication model of pam_usb.
(this is with reference to comments on the question; ps: this is a 2007 reference)

even if someone manages to fake your device's manufacturer attributes and to steal your pads, as soon as you authenticate the pads will be regenerated, making the one they have stolen invalid. It's like having a very long random generated one time password, except the fact you don't have to remember such password.


Older reference.
HOWTO: pam_usb login with USB memory stick

Introduction
This relates to a project of mine, a Single Sign On solution using a usb-memory stick. An advantage is when you have too many passwords to remember, SSO brings this back to one password and one point where you have to login and then use these credentials to access all your applications and resources. For example your webmail, forums etc.

Goals:

  1. Login locally with your usb memory stick on the console (this howto)
  2. Login locally with your usb memory stick on XDM,GDM,KDM
  3. The possibility to remotely login (via ssh) with the the usb memory stick
  4. A layer build on top of the linux login process (locally/remote) which handles the authenication between the the usb memory stick and the keyserver/ Certificate Authority
2
  • I've not tried your system, but you have documented it well, and I appreciate the effort in your response. I will probably try it in the future.
    – user76275
    Oct 18, 2011 at 2:19
  • Broken links now.
    – geek1011
    Apr 21, 2016 at 0:15

You must log in to answer this question.