Ubuntu – How to use pam_blue with lightdm, and unity-greeter

lightdmpam

I want lightdm to skip asking for my password if my phone is nearby. How is that possible with lightdm, and unity-greeter? Also I'm interested in knowing whether its secure, because it doesn't seem being that.

Best Answer

Install pam-blue:

sudo apt-get install libpam-blue

Add the pam module to lightdm:

sudo sed -i 's/^\(@include common-auth\)$/auth\tsufficient\tpam_blue.so\n\1/' /etc/pam.d/lightdm

Get the mac address and bluetooth name of your phone (the bluetooth name must not contain spaces) then open the bluescan.conf file:

sudo vim /etc/security/bluescan.conf

You should edit the file so it looks like this:

general {
  timeout = 5;
}
user = {
  name = Phone;
  bluemac = 00:18:13:9E:E0:DF;
  timeout = 5;
}

replacing "user" with your Ubuntu login name, "Phone" with the name of your bluetooth device (no spaces allowed) and "00:18:13:9E:E0:DF" with the devices mac address.

Next time you are at the login screen and click your name there will be a 5 second delay while pam finds your bluetooth device, if it does a login button will be shown, if not the regular password prompt will appear.

See: french website on pam-blue and bluetooth login and locking