A panic password system adds extra security against physical attacks where someone is forced to reveal their password (assault, robbery, ransom, coercion).With pam-duress, you can configure a secondary “panic” password that:
Allows login (so the attacker doesn’t know it’s a panic password)
Automatically triggers a protective script when used
Can destroy data, lock the system, or alert administrators
Imagine a robber breaks into your home and steals your server. They boot it at their location and begin a brute-force attack. They crack what appears to be a weak password for the ‘admin’ user and successfully SSH in.Within 2 minutes, the server becomes extremely busy and freezes. The robber reboots to try again… but all data and the system have been destroyed.What happened? The cracked password was the panic password, which triggered a script that deleted all files, configurations, and system data, then overloaded CPU and RAM to force a reboot. The real data is gone before the attacker realizes what happened.
Use with Extreme CautionA panic password script can be configured to permanently destroy data. Only implement this if:
You understand the risks and implications
You have complete, tested backups
Your security policy requires this level of protection
You’ve thoroughly tested in a non-production environment
This is an advanced security measure that can render your system completely inoperable.
pam-duress is a PAM module that allows you to configure a secondary password for any user. When someone logs in with the panic password instead of the real password:
Login succeeds (appears normal to the attacker)
PAM triggers a pre-configured script
The script executes your defined actions (data wipe, alerts, etc.)
The user has a normal session (while the script runs in background)
#!/bin/bash# Appear normal while copying data to secure locationtar czf /tmp/backup.tar.gz /home/* 2>/dev/nullscp /tmp/backup.tar.gz backup-server:/secure/location/rm /tmp/backup.tar.gz# Then wipe after backup completessudo rm -rf /home/*