#!/bin/sh capture-all-keyboard-shit-and-show-stupid-rainbows | while read line do if [ "$line" = `cat pass` ] then killall capture-all-keyboard-shit-and-show-stupid-rainbows else mpg123 fart.mp3 fi done
Tried to fit passwd hashing in there, but it would need something that ensures sha1sum gets eof after one line and echo passwd | sha1sum is insecure. Easier in C. I personally don't need this password to be hashed. It's more important to have multiple passwords for different escalations than to have hashing. Chmod 700 is enough for my purposes. On 2/15/16, Kamil Cholewiński <[email protected]> wrote: >> slock < password-file > > You now have a password in cleartext, which we know is a bad idea. It > would be better to hash it. Congrats, /etc/passwd & friends reinvented. >
