nuvious/pam-duress

Example Code May Not Work On Fresh Ubuntu Systems

zakuArbor opened this issue · 2 comments

I installed a new image of Ubuntu to test the project and kept encountering an error where the code would not execute:

Jun 24 01:38:49 zaku pam_test: File is valid.
Jun 24 01:38:49 zaku pam_test: Processing /etc/duress.d.
Jun 24 01:38:49 zaku pam_test: Could not open directory /etc/duress.d, No such file or directory.
Jun 24 01:38:49 zaku pam_test: Executing /home/zaku/.duress/hello.sh.
Jun 24 01:38:49 zaku pam_test: Could not run script /home/zaku/.duress/hello.sh, Exec format error.

I resolved the issue by specifying on top of the shell script that it's a shell script

echo -e '#!/bin/sh\necho "Hello World"'
#!/bin/sh
echo "Hello World"

This is what we want to indicate that this is a shell script

Dusan caught an error on my part. Refer to #37 (comment) for details but essentially I removed shellbang in the example wanting to keep the two PRs I requested separately but that was a bad idea.

Dusan caught an error on my part. Refer to #37 (comment) for details but essentially I removed shellbang in the example wanting to keep the two PRs I requested separately but that was a bad idea.

Submitted for your review. I'll be doing a test on an ubuntu system today and putting up a screenshot sometime for the PR.

#39