From some classes in university, I get a bunch of encrypted pdf files for each lecture. Its really annoying to type in the password of those files every time I want to open them, so here is a trick to remove the password protection from all files. You should have qpdf installed for this to work.
mkdir decr for f in *.pdf; do qpdf --password=FOOBAR --decrypt $f decr/$f; done
FOOBAR by the password. All decrypted pdf files should now be in the folder
decr. If that worked, you can overwrite the encrypted pdf files and remove the folder afterwards:
mv decr/* . rm -rf decr