Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.6: Remove passwords from edit-restricted PDFs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Remove passwords from edit-restricted PDFs
Authored by: mubarak on Feb 25, '10 08:34:52PM

kamath, as mmnw pointed out, the security implications are minimal in changing the permissions on /var/spool/cups. If you are concerned, you can always change them back, or run Disk Utility to fix permissions.

The idea was show that most PostScript drivers will remove DRM and to use the Finder rather than the command line to do it in a step by step manner. However, if you would rather use the command line, most good hints can be reduced to just one line of code. Pause the printer, print to its queue, type the following in Terminal:

sudo mv `sudo ls /var/spool/cups | grep d | sed 's_d_/var/spool/cups/d_'` ~/nopassword.pdf ; sudo chmod +r ~/nopassword.pdf

and authenticate with your password.

This will create a readable file called nopassword.pdf in the home folder, and will also remove the file from the print queue.


[ Reply to This | # ]
10.6: Remove passwords from edit-restricted PDFs
Authored by: CarlRJ on Feb 26, '10 07:40:09PM
My first thought was, you could fold the grep into the sed and save one command, but then I realized that xargs could simplify things and handle multiple files in the queue as well:
sudo -s "cd /var/spool/cups; /usr/sbin/chown -v `id -u`:`id -g` d* | xargs -I@ mv -iv @ ~/Desktop/nopassword_@.pdf"
I think it's also preferable to have the file end up owned by the user, instead of them merely having read access to it.

[ Reply to This | # ]