Login authentication using a USB device and PAM
When a Linux user wants to secure the system, the most common method to do so is always by using the login password. However, we know this method is not very reliable as there are many methods available to hack the traditional password. To increase security, we can use a USB device, as an authentication token, which will be used to log in into the system.
Getting ready
To follow the given steps, we need to have a USB storage device and Pluggable Authentication Modules (PAM) downloaded on the Linux system. Most Linux systems have it in the form of pre-compiled packages which can be accessed from the relevant repository.
How to do it…
By using any type of USB storage device and PAM, we can create an authentication token.
- To start with, we first need to install the packages required for PAM USB authentication. To do so, we run this command:
$ sudo apt-get install pamusb-tools libpam-usb
- Once the packages are installed, we have to configure the...