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 ...

Get Practical Linux Security Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.