Login via Bluethooth

If you try to go over the top with some things, then you should really do it instead of just using some tiny hacks. What about logging into your computer using a mobile phone? Sounds cool, huh? So let’s use it and get to work.

As the title already says, you will need a bluetooth enabled phone, a computer with a compatible bluetooth dongle, the common bluetooth programs and finally a kernel running the correct modules. If you already got those prerequisites, you can check your setup using the hcitool scan command. If things are working and your phone is ‘detectable’, the output should look like that:

user@example:~> hcitool scan
Scanning …
00:0E:07:BF:B4:C4 Z1010
00:04:61:81:5C:6B ubuntu-0

So the computer is able to ‘see’ the device. Now it’s time to install the pam_blue module. Usually there should be a package available for your distribution. Gentoo in example got one. But however – you can always get the latest version from the programmers site. I won’t talk much about compiling now as it usually works quite problem free here. Regarding the configuration – this shouldn’t be a problem too:

general {
timeout = 3;

# configuration for user stargazer
stargazer = {
name = Z1010;
bluemac = 00:0E:07:BF:B4:C4;

The config shown above allows to authenticate the user ‘stargazer’ with the bluetooth mac from the config. If you got things set up correctly, it is time to get your hands on the pam configuration which I already described there. The corresponding pam line would look like that:

auth sufficient /lib/security/pam_blue.so


Leave a Reply

Your email address will not be published. Required fields are marked *