Forum moved here!

# Home / Auto-try previous passwords

Elch

Hey there!

For university I’m often dealing with a bunch of PDFs that all share the same password. Sumatra will remember the password, but only for each individual document, which means I have to re-enter it for each new set of lecture slides.
Is it possible to add a feature that, when opening a new password protected document, automatically tries all previously entered passwords?

GitHubRulesOK

Hi @Elch

There is AN OPTION TO STORE PASSWORDS IN THE SumatraPDF-settings.txt FILE

a whitespace separated list of passwords to try when opening a password protected document
(passwords containing spaces must be quoted) (introduced in version 2.4)
DefaultPasswords =

So add a list at the start like this

# For documentation, see https://www.sumatrapdfreader.org/settings3.2.html
DefaultPasswords = 123 "Hello World" "Super user"
MainWindowBackground = #80fff200
...


Note when it next saves settings it will be moved to a default position lower in the file

Elch

Thank you so much, you made my day!
Have a great one

SumatraPeter

Don’t forget that since the settings file is plain text, anyone with access to it can see the passwords.

@kjk: Just like some archivers perhaps we can have Sumatra too securely cache in RAM any passwords previously entered during the current session only, and try them automatically with any additional password-protected files before displaying the password prompt if required? Of course the cache would be wiped during program exit.

GitHubRulesOK

@SumatraPeter and other viewing this request

Good point made is that in this case passwords are shown as plaintext in the whitelist see Default Passwords