I have used the reload of the configuration method to restore access on devices.
You can replace these two lines in the configuration where you don't know the password with the ones below from a default configuration that makes it netscreen/netscreen.
set admin name "netscreen"
set admin password "nKVUM2rwMUzPcrkG5sWIHdCtqkAibn"
You can also copy these lines from a configuration where you know the password to the unknown password configuration then load it.
This will also work if you need to reset to factory default then load the configuration again because you have no access.