A PAM module that protects sensitive data and provides a panic function for emergency situations. Authentication through passwords or removable media.
Go to file
Jordy Dickinson 05d8fe5d5f
Convert the project to use the GNU Build System (aka Autotools)
LICENSE was renamed COPYING because otherwise `autoreconf` complains loudly.
This is also the reason AUTHORS, INSTALL, and README were created.

Man pages were moved into src/pam_panic/man and src/pam_panic_pw/man.

Finally, certain variables are passed through the config.h file to the
module rather than as -D flags on the command-line.
2018-04-02 14:44:28 -04:00
m4 Convert the project to use the GNU Build System (aka Autotools) 2018-04-02 14:44:28 -04:00
src Convert the project to use the GNU Build System (aka Autotools) 2018-04-02 14:44:28 -04:00
.gitignore Convert the project to use the GNU Build System (aka Autotools) 2018-04-02 14:44:28 -04:00
.travis.yml Travis CI 2018-03-29 04:38:48 +02:00
AUTHORS Convert the project to use the GNU Build System (aka Autotools) 2018-04-02 14:44:28 -04:00
COPYING Convert the project to use the GNU Build System (aka Autotools) 2018-04-02 14:44:28 -04:00
ChangeLog Convert the project to use the GNU Build System (aka Autotools) 2018-04-02 14:44:28 -04:00
INSTALL Convert the project to use the GNU Build System (aka Autotools) 2018-04-02 14:44:28 -04:00
Makefile.am Convert the project to use the GNU Build System (aka Autotools) 2018-04-02 14:44:28 -04:00
NEWS Convert the project to use the GNU Build System (aka Autotools) 2018-04-02 14:44:28 -04:00
README Convert the project to use the GNU Build System (aka Autotools) 2018-04-02 14:44:28 -04:00
README.md Update README.md 2018-04-02 01:18:29 +02:00
configure.ac Convert the project to use the GNU Build System (aka Autotools) 2018-04-02 14:44:28 -04:00

README.md

Build Status Codacy Badge

pam_panic

Purpose

pam_panic is a PAM module that protects sensitive data and provides a panic function for emergency situations.

How it works

You can choose one of two options:

Using two removable media

There are two removable media which work as keys: the auth key and the panic key. The auth key will let you pass to the password prompt whereas the panic key, if provided, will securely erase the LUKS header, rendering the data unreadable.

Using two passwords previous your own password

There are two passwords you are able to set: the key password and the panic password. The key password will let you pass to the original password prompt whereas the panic password, if provided, will securely erase the LUKS header, rendering the data unreadable.

Installation

You will need GCC or similar, as well as the PAM headers. Some distributions package the PAM headers as libpam0g-dev.

To compile and install it, do the following within the project's root directory:

make
sudo make install

Note: the paths of the reboot, poweroff, and cryptsetup commands are passed to the module at compile-time.

Preparation

In that case you want to use removable media: You'll need two GPT-formatted removable storage devices, and said devices must have at least one partition. Here's an example fdisk session, showing how this might be accomplished:

$ sudo fdisk /dev/sdc

Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): g
Created a new GPT disklabel (GUID: AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA).

Command (m for help): n
Partition number (1-128, default 1): 
First sector (2048-15661022, default 2048): 
Last sector, +sectors or +size{K,M,G,T,P} (2048-15661022, default 15661022): 

Created a new partition 1 of type 'Linux filesystem' and of size 7.5 GiB.
Command (m for help): w

You'll find the UUID of your partition in /dev/disk/by-partuuid/. You can find out which device is which typing ls -l /dev/disk/by-partuuid/ in your favourite shell.

Configuration

To configure the module, add the following to the appropriate PAM configuration file(s): (see pam.conf(5) for details on these files).

Using the removable media:

auth       requisite    pam_panic.so auth=<UUID> reject=<UUID> reboot serious=<UUID>
account    requisite    pam_panic.so

Using the two passwords:

auth       requisite    pam_panic.so password reboot serious=<UUID>
account    requisite    pam_panic.so

See man 8 pam_panic for more.

TODO