Install libpam-fscrypt by entering the following commands in the terminal:
sudo apt update sudo apt install libpam-fscrypt
PAM module for Linux filesystem encryption
fscrypt is a high-level tool for the management of Linux filesystem encryption. This tool manages metadata, key generation, key wrapping, PAM integration, and provides a uniform interface for creating and modifying encrypted directories. . This PAM module can be used to unlock one or more directories upon user login and then lock those directories when the user ends their session.