Some profs at my school use passwords for their pdf files, and entering a password every time I just want to quickly look something up really got on my nerves. So I thought, it can't be that hard to remove it. And I was right.

All you need is Pdftk (also available in the Debian and Ubuntu repos).

The command is:

$ pdftk secured.pdf input_pw foopass output unsecured.pdf

Of course you will need the correct password for your file. Pdftk doesn't crack it for you.

If you have multiple files, you can use this handy command:

$ for f in *.pdf; do pdftk $f input_pw foopass output ${f%.pdf}_nopw.pdf; done

This will take every pdf file in the folder and save a password-freed copy as file_nopw.pdf .