nuvious / pam-duress

A Pluggable Authentication Module (PAM) which allows the establishment of alternate passwords that can be used to perform actions to clear sensitive data, notify IT/Security staff, close off sensitive network connections, etc if a user is coerced into giving a threat actor a password.
GNU Lesser General Public License v3.0
1.33k stars 39 forks source link

Account not available error when running scripts in /etc/duress.d #11

Closed nuvious closed 3 years ago

nuvious commented 3 years ago

Getting "This account is currently not available" message when running scripts out of /etc/duress.d/

image

This is likely due to the execution command being su - USER -c "/bin/sh COMMAND". That is sufficient when running commands out of ~/.duress for local user duress scripts but if a root account is disabled, this results in the account being unavailable message. Easy fix is just to change the execution command to /bin/sh COMMAND when running duress scripts out of /etc/duress.d